|
@@ 222-230 (lines=9) @@
|
| 219 |
|
|
| 220 |
|
if (!empty($modSettings['search_simple_fulltext'])) |
| 221 |
|
{ |
| 222 |
|
if ($smcFunc['db_title'] == "PostgreSQL") |
| 223 |
|
{ |
| 224 |
|
$language_ftx = $smcFunc['db_search_language'](); |
| 225 |
|
|
| 226 |
|
$query_where[] = 'to_tsvector({string:language_ftx},body) @@ plainto_tsquery({string:language_ftx},{string:body_match})'; |
| 227 |
|
$query_params['language_ftx'] = $language_ftx; |
| 228 |
|
} |
| 229 |
|
else |
| 230 |
|
$query_where[] = 'MATCH (body) AGAINST ({string:body_match})'; |
| 231 |
|
$query_params['body_match'] = implode(' ', array_diff($words['indexed_words'], $query_params['excluded_index_words'])); |
| 232 |
|
} |
| 233 |
|
else |
|
@@ 257-267 (lines=11) @@
|
| 254 |
|
$query_params['boolean_match'] = substr($query_params['boolean_match'], 0, -1); |
| 255 |
|
|
| 256 |
|
// if we have bool terms to search, add them in |
| 257 |
|
if ($query_params['boolean_match']) |
| 258 |
|
{ |
| 259 |
|
if($smcFunc['db_title'] == "PostgreSQL") |
| 260 |
|
{ |
| 261 |
|
$language_ftx = $smcFunc['db_search_language'](); |
| 262 |
|
|
| 263 |
|
$query_where[] = 'to_tsvector({string:language_ftx},body) @@ plainto_tsquery({string:language_ftx},{string:boolean_match})'; |
| 264 |
|
$query_params['language_ftx'] = $language_ftx; |
| 265 |
|
} |
| 266 |
|
else |
| 267 |
|
$query_where[] = 'MATCH (body) AGAINST ({string:boolean_match} IN BOOLEAN MODE)'; |
| 268 |
|
} |
| 269 |
|
} |
| 270 |
|
|