WordPress.org

Support

Support » Plugins and Hacks » [Plugin: Relevanssi – A Better Search] Relevance not working unless category is supplied

[Plugin: Relevanssi – A Better Search] Relevance not working unless category is supplied

Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Author Mikko Saari

    @msaari

    Are you sure you are getting results from Relevanssi in all cases? I don’t know why the order by relevancy wouldn’t work, because no matter what, the results are always created in order of relevancy and then sorted if something else is required.

    Have you looked at the examples on the site I am using?

    The only difference between the one that does work and the one that doesn’t is I’m specifying a category. Now the reason why it’s not working may be because of another reason, but I was wondering if anybody had any clues or something to try.

    Cheers,
    Steve

    Plugin Author Mikko Saari

    @msaari

    I did take a look at them and that’s why I asked.

    Would any of the settings have an impact on these results?

    Cheers,
    Steve

    Plugin Author Mikko Saari

    @msaari

    Hmm… you might want to try adding the relevancy score in the search results to see if that brings up something.

    So, check “Show breakdown of search hits in excerpts” and then put %score% in “The breakdown format”. What kind of scores do you get when you have orderby=relevance all without the category and with the category?

    Ok so when there is a search without a category (the one where it fails)..

    http://calva.co/?s=lorem&submit=Go

    It’s getting -0.32 for the posts with one occurrence and -10.57 for the one where lorem appears lots.

    If you do a search that includes a category then it’s 53.52 for the one where it appears lots and 1.62 for the others.

    So it looks like without a category it’s somehow making the results negative…

    Cheers,
    Steve

    Plugin Author Mikko Saari

    @msaari

    That’s odd, but it does show the relevancy ordering is working.

    I do have an idea: this just might be caused by having all posts with the same content. Try mixing things up a bit, change the contents of posts a bit so that every post isn’t the same. That just might help.

    I’ve changed the content about a bit. Have a look at this search…

    http://calva.co/?s=windows&orderby=relevance

    Still producing negative numbers. If they can be removed then it’ll be fixed, as the scores without the minus are correct.

    Cheers,
    Steve

    Plugin Author Mikko Saari

    @msaari

    Your search form on the search results page is broken, by the way – you have two “s” input fields in it.

    Frankly, I don’t know why the scores are negative. Looks like the search works otherwise, as the negative values are sorted in the right order.

    The problems might still be caused by the small number of posts in the database. At the moment I’d probably just wait and see if the problem persists once you start adding posts. If it doesn’t go away, then you can start digging on the calculations to see where they go wrong.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘[Plugin: Relevanssi – A Better Search] Relevance not working unless category is supplied’ is closed to new replies.