Jump to content

Search Results Not Highlighting Short Words

Featured Replies

Posted

It seems as though only search terms that have at least three characters in them are being highlighted (eg red characters with a yellow background (class="searchlite")); search terms less than three characters are not getting highlighted. (My settings for Search Set-Up has the system using the Sphinx Search, using fulltext searching (although I don't think it applies to Sphinx Search), and its minimum search word length being 2 letters.)

It looks like line 4296 in admin/sources/base/core.php is keeping short words from being highlighted:

 	if( strpos( $highlight, '&quot;' ) === false AND strlen( $keywords ) < 3 )



Of course, I can hack the code to get around this, but I wonder if there's any way that the code can pull the minimum search word length in the settings to determine the shortest word to highlight?

Thank you.

I would actually consider this a bug, and recommend posting it in the bug tracker.

  • Author

Hi Brandon,

Thanks for your response; I have just submitted this into the bug tracker.

Archived

This topic is now archived and is closed to further replies.

Recently Browsing 0

  • No registered users viewing this page.