I’ve discovered an additional bug. It happens so:
a) If fuzzy search is set to only happen when no exact match is found; and that exact term is indeed indexed, but is present only in non-published posts; then when one searches for that term, this results in a “nothing found” page, even though a fuzzy search would have resulted in posts found due to the term being part of another, big term.
For example: if I have a published post with the word “shirts”, and an unpublished post with the word “shirt”, then searching for “shirt” will result in “nothing found”, even though one’d expect the fuzzy search to trigger and show the post containing the word “shirts”.
b) However, if the fuzzy method is changed to “always”, that search for “shirt” works, and the post with the word “shirts” appear.
This means, I guess, that the place in the code that searches for exact terms isn’t checking whether those posts it found are “displayable” before concluding a fuzzy search isn’t needed, because if it where, it’d know that none of those posts it found are visible, hence that the search for the exact term failed, and that’s necessary to trigger a fuzzy search.
I’ve tried to find where in the code this is happening to see if it was something easy to fix, but couldn’t find it. So, I went to the workaround of setting fuzzy searches to “always”.
I’ll try again next week, unless the fix comes before that. It’s a fun exercise. 🙂
- The topic ‘[Plugin: Relevanssi – A Better Search] Bug: Fuzzy search isn't always started when it should’ is closed to new replies.