- May 3, 2017 at 9:24 pm #12964
me again. I have a question. I received a few comments regarding the results by the search bar. Some people say that the results are too “spongy”. For example if the you search “Elder of Scrolls”, it is the third from last results. Also other games like “Elder Scrolls Online”, “Morrowind” and so on…
Those gametitles are just some examples. This sorting is effecting a lot of games… Do you have an idea how I could increase the match sorting? – Maybe to sort the the games in addition by the page views or something like this?
Or even to sort the games by the length would be increase the match sorting, I think so. For example:
If you are searching “Elder of Scrolls” to list “The Elder Scrolls V Skyrim” as first one, “XBOX The Elder Scrolls V Skyrim” as second one and so on because they are the titles who are the shortest.
What do you think, how can I implement that or do you have a better solution?
Greetings!May 5, 2017 at 6:12 pm #12992
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: https://i.imgur.com/VAn7i8t.png
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: https://i.imgur.com/TWWfe46.png
By default, WordPress does not store pageviews though.
I hope this helps!Best,
If you like my products, don't forget to rate them on codecanyon :)
May 5, 2017 at 8:35 pm #12999
What would you suggest for my case? – I send you two examples… I don’t know… I’m very weak-minded…
You must be logged in to reply to this topic.