1

All three letter words using Low Search are not showing in results yet are showing when I use the native EE search.

These are words such as "Air" or "Ten" which appear in the entry title. These words appear in the Lexicon and the title has a weight of 3.

Form tag:
{exp:low_search:form result_page='search/lowsearch' collection='products'}

Results Tag:
{exp:low_search:results query='{segment_3}' collection='products' keywords:lang='en'}

Details:
EE: 2.9.2
Low Search: 4.4.1
Collection: products
Min word length: 3

Lexicon search

Collection settings

Low Search Settings

1 Answer 1

1

The Minimum word length setting has to reflect your MySQL's ft_min_word_len setting. This defaults to 4. Some people, who have complete control over their hosting environment, can change this setting to a lower number, but most of the time, the default value is accurate. If you set the value to a different (specifically lower) number than is registered in MySQL, then unexpected results can happen. If you haven't customized your MySQL installation, then chances are that setting still has the default value.

Low Search's collection index uses MySQL's native full-text functions to get search results for keyword searches. MySQL's full-text index only indexes words that are of the ft_min_word_len and up. So, by default, 4 characters and up; 3 and below are ignored. That means searching for words that are 3 chars and below would return no results. This is why LS fires an alternative search method (based on LIKE) when it sees the keywords fall below the threshold. However, if the Minimum word length in LS is set to 3 while it's actually 4 in MySQL, the regular search method will fire with 3-letter words, and consequently will return no results.

tl;dr: change your Minimum word length setting back to 4.

1
  • Thank you. It worked. That will teach me to play with something without understanding it.
    – Cheyney
    Aug 11, 2016 at 8:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.