Skip to content

Commit

Permalink
Relevance by number of words in title only, removed introtext relevance
Browse files Browse the repository at this point in the history
  • Loading branch information
ggppdk committed Apr 25, 2018
1 parent 56c07ef commit 5a2032a
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions plugins/search/content/content.php
Expand Up @@ -92,7 +92,6 @@ public function onContentSearch($text, $phrase = '', $ordering = '', $areas = nu
$wheres2[] = 'a.metadesc LIKE ' . $text;

$relevance[] = ' CASE WHEN ' . $wheres2[0] . ' THEN 5 ELSE 0 END ';
$relevance[] = ' CASE WHEN ' . $wheres2[1] . ' THEN 2 ELSE 0 END ';

// Join over Fields.
$subQuery = $db->getQuery(true);
Expand Down Expand Up @@ -150,7 +149,6 @@ public function onContentSearch($text, $phrase = '', $ordering = '', $areas = nu
$wheres2[] = 'LOWER(a.metadesc) LIKE LOWER(' . $word . ')';

$relevance[] = ' CASE WHEN ' . $wheres2[0] . ' THEN 5 ELSE 0 END ';
$relevance[] = ' CASE WHEN ' . $wheres2[1] . ' THEN 2 ELSE 0 END ';

if ($phrase === 'all')
{
Expand Down

0 comments on commit 5a2032a

Please sign in to comment.