A search autocomplete result does not retrieve actual search results with prefix text enabled. Removing the prefix text allows the site search feature to retrieve search results.

Tried excluding the prefix text from the search ignore feature as well as prec exclusions did not rectify.

Tested with search 404 module enabled.

Advice?

Comments

dom.’s picture

Hi!

Sorry I did not understand your problem. (my crappy english !)
I tested with the search 404 module. It seems to do everything correctly... What the problem then? Could you make a screenshot with a little comment?

If you do not want to include the prefix in the search, modify the search_autocomplete.module file. Change line 54 to get:

$sug_index = trim($prefix) . ' ' . html_entity_decode(check_plain($sug_elem), ENT_QUOTES);
$sug = html_entity_decode(check_plain($sug_elem), ENT_QUOTES);
$matches[trim($sug_index)] = trim($sug);                // add the suggestion to be returned

Regards,
Miro

dom.’s picture

Status: Active » Closed (fixed)