|
@@ 212-220 (lines=9) @@
|
| 209 |
|
|
| 210 |
|
if (!empty($modSettings['search_simple_fulltext'])) |
| 211 |
|
{ |
| 212 |
|
if($smcFunc['db_title'] == "PostgreSQL") |
| 213 |
|
{ |
| 214 |
|
$language_ftx = $smcFunc['db_search_language'](); |
| 215 |
|
|
| 216 |
|
$query_where[] = 'to_tsvector({string:language_ftx},body) @@ to_tsquery({string:language_ftx},{string:body_match})'; |
| 217 |
|
$query_params['language_ftx'] = $language_ftx; |
| 218 |
|
} |
| 219 |
|
else |
| 220 |
|
$query_where[] = 'MATCH (body) AGAINST ({string:body_match})'; |
| 221 |
|
$query_params['body_match'] = implode(' ', array_diff($words['indexed_words'], $query_params['excluded_index_words'])); |
| 222 |
|
} |
| 223 |
|
else |
|
@@ 245-255 (lines=11) @@
|
| 242 |
|
$query_params['boolean_match'] = substr($query_params['boolean_match'], 0, -1); |
| 243 |
|
|
| 244 |
|
// if we have bool terms to search, add them in |
| 245 |
|
if ($query_params['boolean_match']) { |
| 246 |
|
if($smcFunc['db_title'] == "PostgreSQL") |
| 247 |
|
{ |
| 248 |
|
$language_ftx = $smcFunc['db_search_language'](); |
| 249 |
|
|
| 250 |
|
$query_where[] = 'to_tsvector({string:language_ftx},body) @@ to_tsquery({string:language_ftx},{string:boolean_match})'; |
| 251 |
|
$query_params['language_ftx'] = $language_ftx; |
| 252 |
|
} |
| 253 |
|
else |
| 254 |
|
$query_where[] = 'MATCH (body) AGAINST ({string:boolean_match} IN BOOLEAN MODE)'; |
| 255 |
|
} |
| 256 |
|
|
| 257 |
|
} |
| 258 |
|
|