"All words" search returns nothing
I have a strange situation in which one particular search does not work, and I really can't see why not. I'm hoping you might be able to explain things for me ...
I have a catalog of books, and one of the titles is "A Brief History of BLAH". The title field has a weight of 3; certain other fields are weighted below that. I have rebuilt the index a few times now ...
If I do a search on "brief history" using the "All Words" option, nothing at all is returned. The search comes out completely blank. (It does work in other cases, though)
If I run the same search using the "exact phrase" option, it finds and displays the book. No other books are found.
If I run the same search using the "any word" option, the book appears (but this time it is quite some way down the list).
I'm afraid I really don't understand why the "all words" option is not working with this book. Any ideas on what might be going wrong?
Thanks in advance for any help you may be able to give.
Andrew
Replies
Low 9 Jul 2011 10:54
Hey Andrew,
I think this has to do with the presence of one or more Fulltext stopwords. In your case "brief" is such a word. When present, MySQL's full text functions apparently doesn't find it. Do you have the loose ends option turned on, perhaps?
I'm also looking into a workaround for this issue, where all stopwords are saved in the extension settings and could trigger the alternative search method instead of the MATCH/AGAINST way.
Andrew Mac 10 Jul 2011 03:35
Hi Low
You lost me a little bit with the explanation, but I'm more than happy to trust your expertise in this matter :-)
I've done a few more tests now and I can report that with loose_ends "off" a search for "brief history" does actually return results ... but still not the "Brief History" entry. It does look, however, to be an identical set of results to what is returned when searching for just "history".
A search for just "brief" with loose_ends "off" still returns nothing.
I widened the search to include all channels, and this time a search for "brief" with loose_ends "on" did return one entry that contained the word "briefs" (with a "s" at the end).
As before, searching for the exact phrase "brief history" still works correctly.
So it's all just a little bit confusing, but it does indeed look like that stopword is being completely ignored.
Cheers
Andrew
Low 11 Jul 2011 07:25
Okay, so it looks like I'll have to work on an alternative search method for those stopwords. Consider it a filed feature request.
Andrew Mac 11 Jul 2011 08:20
Thanks so much, and I will certainly be hoping your giant brain can come up with something. I really like Low Search, and don't want to have to start considering a switch to one of the other options :-)
Cheers
Andrew
Low 27 Sep 2011 20:53
Hi Andrew,
I reckon version 1.0.6 will play nicer with searches containing stop words or short words.
Andrew Mac 28 Sep 2011 08:36
Hi Low
I reckon you might be right :-)
I tested again with the same search query as in the original post, and this time it found the right book.
Thanks heaps
Andrew
Low 28 Sep 2011 08:45
Excellent!