Reply To: Improve Search Bar results!


Ernest Marcinko


There are a few thing you can do to improve the search results, I will list a few suggestions, then you can experiment with the options:

1. Keyword logic
Keyword logic very much affects the final result set and it's relevance. The default 'OR' logic is very permittive, as it allows any item that matches either of the keywords, on either field. You can change the keyword logic on the General Options -> Logic & Behavior panel:

For your case I would recommend either AND or the AND with exact keyword matches option. They will yield much less results, but they are usually more relevant.
To learn more about keyword logics, check these parts of the documentation:
Keyword logics with examples

2. Individual priorities
Result priorities can be set, so in case you want to always display certain items over others, this is a great feature: Result priorities

3. Ordering by title length – as you suggested
If you prefer this over anything, this is also possible with some custom code:

4. Ordering by custom field values
Ordering by pageviews could be also possible, if the pagevies are stored as a custom field for each post. If this is the case you can set it up on the General Options -> Ordering panel:
By default, WordPress does not store pageviews though.

I hope this helps!

Ernest Marcinko

If you like my products, don't forget to rate them on codecanyon :)