Support » Plugin: Relevanssi - A Better Search » Not getting expected results

  • Hi.

    I’ve been hanging off looking into this for some time but have decided now I really need to after doing a bit of testing. The search results I’m getting aren’t accurate enough, and I have no idea why.

    For example I have 3 Call of Duty reviews (at least) on the site. Searching for Call of Duty review doesn’t bring back a positive result until page 3 (there are 9 results on each page), and even worse there are 3 completely different games that appear before this one that have the word review in the title. I would really expect the first 3 results to be the 3 COD reviews we have.

    I’ve tried changing the weights and the default operator but no matter what I do I can’t even get one of the reviews onto the first page.

    Currently I have Post Title weighted at 5, with tags at 1(I’ve tried both at 5, tags at 5 and title at 1 etc) and comments and categories at 0. I also have fuzzy search turned off.

    Any ideas how I can get the results to be more accurate? For information there are more than 3000 documents in the index.

    http://wordpress.org/extend/plugins/relevanssi/

Viewing 11 replies - 1 through 11 (of 11 total)
  • Thread Starter gamedot

    (@gamedot)

    I’ve just checked each of the posts I would expect to appear first, and each one has “Call of Duty” and “Review” in the tags, so I don’t know why they’re not appearing first.

    Plugin Author Mikko Saari

    (@msaari)

    Are you perhaps talking about Gamedot.co.uk? It would be most helpful to know what we’re talking about here.

    If that’s the site, the results for “call of duty review” seem generally quite relevant, as all those posts are about Call of Duty.

    That “review” is probably a rather weak search term – you have nine pages of results for “review”.

    Those weight adjustments you’ve made so far are quite small. Try putting more weight to it – instead of 5, use 50, or 100.

    Also, enabling AND search would probably help here – that would drop all non-reviews from the search results.

    Thread Starter gamedot

    (@gamedot)

    Hi. Thanks for the reply.

    Yep that’s the site.

    I had used the AND search before because it made more sense, and with the same weights as mentioned above I got a really strange result – just 1 result with the article title being “Battlefield 3 review” which made no sense at all.

    I change the weights so Post Titles was set at 100, everything else remained the same (Tag weight 1, Category and Comment 0) and I still get the 1 result – Battlefield 3 review.

    I did notice Call was a stop word so removed it and did a reindex but received the same results.

    If I have Tag weight at 100 and title at 1 I get.

    I’ve also tried 500, not sure how high you can go?

    I’ve had to change it back to OR because I can’t have such inaccurate results as I currently get with AND. Using AND makes more sense, but the results being returned are really strange.

    Thread Starter gamedot

    (@gamedot)

    Also, with the OR search if you try “call of duty” review as the search query that works great. First 4 results are all Call of Duty reviews. Try AND and same result, first 4 results all Call of Duty reviews.

    Noticeable differences otherwise though. The OR results seem to be a lot more relevant. With AND the remaining results brought back Battlefield and other reviews.

    Plugin Author Mikko Saari

    (@msaari)

    Well, that Battlefield 3 does have the exact phrase “Call of Duty review” in it… But strange that the AND search drops off all the actual Call of Duty reviews. That’s odd, and some kind of bug. Are you using the latest version of Relevanssi? Recent versions have had some issues with the AND search, version 3.1.3 fixed them. If you are using the latest version, I’d love to take a closer look at your site (with FTP access, for example) to see why exactly the AND search is not working.

    Anyway, the main problem – besides the malfunctioning AND search – here is that all the search words are really common. It’s very hard to get really relevant results out of them. As you’ve noticed, phrase search is the way to go here. Maybe mention it in your search results page? If the results aren't relevant enough, try phrase searching, like "call of duty".

    Here’s something you can try. Put this code in your functions.php. It should then make every search of call of duty a phrase search. Problem solved? It’s a hack, but this is a tricky situation.

    add_filter('relevanssi_modify_wp_query', 'phrase_cod');
    function phrase_cod($query) {
        $query->query_vars['s'] = str_replace('call of duty', '"call of duty"', $query->query_vars['s']);
        return $query;
    }
    Thread Starter gamedot

    (@gamedot)

    Thanks for the response.

    Yes the plugin is always kept up to date. I’ve even just disabled and deleted the plugin and reinstalled and re indexed but still having the same problem.

    I’m happy to try the hack, but Call of Duty was just an example, I’d need it to behave that way for all searches which I don’t think would be possible would it?

    Plugin Author Mikko Saari

    (@msaari)

    Well, do other searches exhibit similar problems? Because here the problem seems to me to be caused by the commonness of the search terms. In other cases the problem might not be as severe. But you know better, it’s your site.

    Thread Starter gamedot

    (@gamedot)

    I’m having the problem with all reviews really. A search for Batman review again provides results but not in the order I expected. Again items that have no relevance to those search terms (or so it appears) are appearing before the first Batman related review (Batman: Arkham Asylum review).

    If I use AND again just one result is returned, “Gamedots End of Year review”, returned because I believe Arkham Asylum was someones Game of the Year. Again quotes around Batman will return the best results.

    The problem seems to occur, or is at least appearing to be worse, when there is more than 1 review for a game series (Forza for example). If there’s just the one game it seems to work quite well.

    Plugin Author Mikko Saari

    (@msaari)

    Well, I’d like to explore this a bit further, but there’s not much more I can do with just looking at the site – I’d need to be able to take a look under the hood, so to speak. Would that be possible? Either WP admin access or FTP access.

    Thread Starter gamedot

    (@gamedot)

    Hi Mikko,

    Apologies for the delay in responding.

    That would be great. I’ve created a clone of the site and uploaded the articles. I’ve configured the plugin so that it is setup the same on both sites as well. Getting pretty much the same results on the newly established site.

    I’ll give you access to this site. I figure this will be better so you can make any changes you need to do without an impact being felt on the live site.

    If you head to http://www.gamedot.co.uk/2009/01/07/contact-us-2/ you’ll find an email address you can contact me on and we can sort access out for you.

    Cheers.

    Plugin Author Mikko Saari

    (@msaari)

    Email sent.

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Not getting expected results’ is closed to new replies.