Forums

Relevanssi - A Better Search
[resolved] Search showing fuzzy results despite being match (apart from blocked words) (17 posts)

  1. deadhippo
    Member
    Posted 9 months ago #

    Search results for Don't Care Bears on my site is displaying all posts with the words "Don't", "Care" and "Bears" despite one post being titled "Don't Care Bears T-Shirt".
    The default operator is AND and "when to use fuzzy matching" is set to "When straight search gets no hits".

    The word T-Shirt is a stopword but it seems to be causing the trouble.

    Is there a solution for this?

  2. msaari
    Member
    Posted 9 months ago #

    Hmm, I'd need to take a closer look to figure out what's going on, there's probably a solution.

  3. deadhippo
    Member
    Posted 9 months ago #

    Thanks.

  4. fringer
    Member
    Posted 9 months ago #

    Same thing here, only without the stop word. The settings are the same and the search outputs everything - even if the search term contains a one letter word, then that letter is highlighted as a result.

    Minimum character number is set to 3, and when I input 1 or two characters in the search, I get the not found message - as it should be, but when a multiple word search term is entered, which contains a 1 or 2 letter words, then they are highlighted as results.

    There seems to be a problem with AND search - I've tried multiple searches with copy paste from site content, and although the post or page from which the term was copied does end up in results, it's only there because of fuzzy search. The exact term gets 0 results, as stated in search.

    Correct me if I'm wrong, but a copy/paste of a part of text should be found?

  5. msaari
    Member
    Posted 9 months ago #

    Do note that Relevanssi will highlight more than it matches. Small words in the search query will be highlighted, but not used in matching.

    I don't know, I haven't noticed any problems with the AND search, it works just as expected.

  6. fringer
    Member
    Posted 9 months ago #

    Try doing a search for a multiple word term, a rare one or a single combination of words if possible, and you'll notice that it does show up as a result, but not as the only result, and definitely not as the first.

  7. deadhippo
    Member
    Posted 9 months ago #

    Here is the example from above of it not working as expected:

    Here is the search result from "Don't Care Bears T-Shirt"

    http://www.theshirtlist.com/?s=Don%27t+Care+Bears+T-Shirt&submit=Search

    The word t-shirt is blocked and it gives a fuzzy result despite their being an almost perfect match:

    http://www.theshirtlist.com/dont-care-bears-t-shirt/

    If I leave out the blocked word "T-Shirt" I get the accurate result:

    http://www.theshirtlist.com/?s=Don%27t+Care+Bears&submit=Search

  8. msaari
    Member
    Posted 9 months ago #

    "don't care bears shirt" works, by the way. So does "don't care bears tshirt".

    I was finally able to reproduce the error on my site. The problem appeared, when I added a single letter to the search string. That'll break it. Good. I can see about fixing it, now.

  9. msaari
    Member
    Posted 9 months ago #

    There's a bug in the code - I seem to remember fixing it earlier, but it's possible I only fixed in Premium. In any case, it's easy to fix and the next version will be correct.

  10. deadhippo
    Member
    Posted 9 months ago #

    That's awesome. Thanks.

  11. fringer
    Member
    Posted 9 months ago #

    Great! Thanx!

    Just did the search and really it is only the problem od 1 letter words, tried a multiple word search where all words are with more letters and it worked flawlessly.

    EDIT: whoops, spoke too soon - I didn't do many searches, but it seems to be a problem with 2 character words also - that is, in my case, anything under the minimum set in settings - I have default of three.

    Also, if I input two words, the results I get are not exact - to use the previous example, if I searched for "Care Bears" I would get a result for both:

    Do you care about bears?
    and
    Don't Care Bears T-Shirt

    (letter case not important)

    with the exact term, "Care Bears", having lesser weight and being on the second spot.

    Is the "AND" search suppose to behave like that?

  12. deadhippo
    Member
    Posted 9 months ago #

    So you know, my site is set to a default of three. I think I could solve the problem on my side by indexing even 1 letter words. I don't think that this is a solution for most people though.

  13. msaari
    Member
    Posted 9 months ago #

    AND search does not care about phrases, Relevanssi database doesn't store them (it only has single words) and gives them no extra weight. If you want phrases, you must search for them like this: "care bears". Then you'll get only the phrases.

    Yes, the problem has to do with words under the minimum length: they are removed from the search, after which Relevanssi sees that all search terms weren't matched by the AND search and falls back to OR search, even though all proper search terms were matched.

  14. deadhippo
    Member
    Posted 9 months ago #

    Do you think it will be possible to solve this problem?

  15. deadhippo
    Member
    Posted 9 months ago #

    I guess the update answers that question. Awesome, thanks!

  16. msaari
    Member
    Posted 9 months ago #

    Yes, the 2.9.10 update should fix it.

  17. deadhippo
    Member
    Posted 6 months ago #

    It did fix it and this plugin is awesome folks!

Reply

You must log in to post.

About this Plugin

About this Topic

Tags