WordPress.org

Ready to get started?Download WordPress

Forums

Relevanssi - A Better Search
Mixing Relevance and Date? (2 posts)

  1. Agrajag27
    Member
    Posted 1 year ago #

    My site (slashcomment.com) is now using Relevanssi (and I believe we'll be moving to Premium almost immediately once we understand everything).

    I have a few test searches I use to test things and one is giving me fits that I'm not understanding. On the site we have a number of posts with the following title:

    The Year In Movies {year}

    {year} ranges from 2007 to 2012. When I search for "the year in movies" Relevanssi shows all the 6 links first (awesome) but in a strange order of 2007, 2008, 2009, 2012, 2010, 2011.

    The post dates, of course, are all about one year apart. What can I do to get these to show up first but in the order from 2012 at the top and 2007 at the bottom?

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

  2. Mikko Saari
    Member
    Plugin Author

    Posted 1 year ago #

    If 2007 is constantly first, it's probably the best result for that search. If you enable the "Search breakdown" option and add couple of keywords to the breakdown (%terms% and %score% are good), you'll see why Relevanssi ranks the posts in that order. Might be the word "movies" or "year" appears more often in the 2007 post.

    If all those posts are of equal value, then the order is essentially random.

    It is possible to create a filter function that goes through the search results and if it finds those "Year in movies" posts, it orders them by date – but it gets a bit complicated soon and may make the search results worse for some cases, unless you set it up for that particular search query. And if you only set it for that query, well, just how common that query is? That is - is fixing this worth the fairly considerable effort?

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.