Commit 07b956bd authored by merlinofchaos's avatar merlinofchaos

#201537 by mcvecka and darrenoh: add FALSE filter to search.

parent 1a188809
......@@ -40,6 +40,7 @@ function search_views_handler_search_index($op, $filter, $filterdata, &$query) {
// Calculate maximum relevance, to normalize it
$normalize = db_result(db_query('SELECT MAX(relevance) FROM temp_search_sids'));
if (!$normalize) {
$query->add_where("FALSE");
return;
}
$select2 = str_replace('i.relevance', '('. (1.0 / $normalize) .' * i.relevance)', $select2);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment