WordPress.org

Forums

Relevanssi - A Better Search
[resolved] sort results by custom type than by category (7 posts)

  1. Modesty
    Member
    Posted 4 years ago #

    is there a way for Relevanssi to display custom type posts first and than the rest of the posts sorted by category?

  2. Mikko Saari
    Member
    Plugin Author

    Posted 4 years ago #

    I've built a mod like this for someone and it's definitely doable. There's a filter hook called relevanssi_hits_filter, which lets you adjust the order of the results. Just go through the array of hits and rebuild it the way you want.

    If doing it yourself is too difficult, I can do it for you. Contact me at mikko at mikkosaari.fi for more details.

  3. Modesty
    Member
    Posted 4 years ago #

    ok, I've figured this one out, but now I have another very straneg problem... if I do a search for a single word with diacritics the search returns nothing?!?! any idea how to fix this?

  4. Mikko Saari
    Member
    Plugin Author

    Posted 4 years ago #

    Is your database collation charset correct?

  5. Modesty
    Member
    Posted 4 years ago #

    Now that you've mentioned it -I've checked and the Relevanssi fields have different collation than the rest of the database?!? I'm affraid if I try to change it that it will break my database... will it?

  6. Mikko Saari
    Member
    Plugin Author

    Posted 4 years ago #

    No, go ahead and change the Relevanssi field collations. It doesn't harm anything and even in the worst case you'll just reindex and it's fine.

  7. Modesty
    Member
    Posted 4 years ago #

    Did. Works now. Thnx.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Relevanssi - A Better Search
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic

Tags