The hack requires changing this file: /plugins/search/flexisearch.php
The code changes are as follows:
Add the following at the top of the plgSearchFlexisearch function
$originalText = $text;
Look for the following code at the bottom of that function:
foreach($list as $key => $row) { if($row->sectionid==FLEXI_SECTION) $list[$key]->href = JRoute::_(FlexicontentHelperRoute::getItemRoute($row->slug, $row->categoryslug)); else $list[$key]->href = JRoute::_(ContentHelperRoute::getArticleRoute($row->slug, $row->catslug, $row->sectionid)); }
and replace it with this:
foreach($list as $key => $row) { if($row->sectionid==FLEXI_SECTION) $list[$key]->href = JRoute::_(FlexicontentHelperRoute::getItemRoute($row->slug, $row->categoryslug)); else $list[$key]->href = JRoute::_(ContentHelperRoute::getArticleRoute($row->slug, $row->catslug, $row->sectionid)); if(stripos ( $row->title , $originalText ) !== false){ $firstObject = $list[0]; $list[0] = $list[$key]; $list[$key] = $firstObject; } }