• Resolved Yavor Simeonov

    (@simeonovy)


    Hello, I have installed and configured the plugin. It works, but because of another app that allows manual reordering of posts, the search results are loaded by recency from back to front. That is, the first results are the most irrelevant, and the last ones are the most accurate. It turned out that when searching the search admin page, Relevanssi reads the post from back to front. That’s probably why it shows the results like that. I suspect the “and” function doesn’t work either for the same reason. Would you be helpful in this interesting case study?

    The page I need help with: [log in to see the link]

Viewing 2 replies - 16 through 17 (of 17 total)
  • Plugin Author Mikko Saari

    (@msaari)

    I’m not sure Relevanssi is the right tool for you, to be honest. You’re creating lots of overhead only to discard the biggest benefit you get from Relevanssi, i.e. the relevant results.

    But to get results in date order, just change the snippet I gave you to this:

    add_filter( 'relevanssi_orderby', 'rlv_fix_order' );
    function rlv_fix_order( $orderby ) {
      return array( 'post_date' => 'desc' );
    }

    Now the results will be ordered by post date.

    To get more precise results, you can try forced phrase search.

    Thread Starter Yavor Simeonov

    (@simeonovy)

    Thanks once again. I changed the code but the results became inaccurate again. Yes, accurate in terms of date, but not in terms of relevance. Is it possible to do this at the same time? We were close.

Viewing 2 replies - 16 through 17 (of 17 total)
  • The topic ‘Display back-to-back search results by relevance’ is closed to new replies.