Confirmed InnoDB search returning no results when the first word is a common word despite direct title match

rvallee

New member
Licensed customer
Affected version
2.3.10
Our Xenforo forum has recently migrated the search function to InnoDB. It works better in most cases, but in some odd cases will return no results when the searched term begins with a common word.

For example a thread titled "how problems with search began" (not a real example but close enough) could yield zero results, but omitting the first "how" will match, returning the titled thread and comments that include it. The expected behavior here is that Xenforo would simply drop the common words, and report it has done that. Simply swapping the order of the first word (i.e. "problems how with search began") will work, with Xenforo reporting it has dropped "how" and "with".

For some reason, sometimes it does return results, but inconsistently. I haven't really nailed down the conditions, but it usually fails and I would like to fix that.
 
A precision: it does not matter which word it is, and the issue is over uppercase letters. Meaning that the presence of a non-indexable word (e.g. the, who, which, about) with a single uppercase letter at any location (This, tHis, thIs, thiS, tHIS) will make the query fail, and that word can be at any location in the query, doesn't have to be the first.

I have tried a simple workaround, strtolower()ing the keywords in the withKeywords method of the XF/Search/Query/KeywordQuery class, and that works around the problem. Not the ideal location, but at least it confirms the nature of the bug.
 
Back
Top Bottom