Home › Forums › Product Support Forums › Ajax Search Pro for WordPress Support › Individual Priorities
- This topic has 9 replies, 2 voices, and was last updated 5 years, 7 months ago by
skempenaar.
-
AuthorPosts
-
October 20, 2020 at 3:52 pm #29917
skempenaar
ParticipantHI Ernest,
How does priorities exactly work and how powerful is it. i’ve changed the value for 3 books from 100 to 101 and with a search “kinderen van het licht” these titles pop up first. the title of a product has a weight of 500 so i did not expect this to happen. a bug or some misconfiguration?
cheers
October 21, 2020 at 9:09 am #29930Ernest Marcinko
KeymasterHi,
That looks correct to me. Priorities always override the relevance values, as they are a separate ordering criteria. Prioritized matches will always be at the top of the results list.
The ordering queue of each result is the following:
Group Priority > Individual Priority > Post Type priority > Primary Ordering (relevance usually) > Secondary Ordering > ID orderingOctober 21, 2020 at 9:25 am #29934skempenaar
Participantthx for clearing this out. but why is “maffe meester daan” at the top of the results now? because its in the category “kinderen” ? do you know a way how to fix this? i’ve changed the priority because with the search “daan” for that book did not result in what it should. with the priority change this is fixed.
the same issue is relevant now for this search. what i want is that the second book is on the top. changing the title is not possible:) how would you do this? without this title popping with every seach related at the top beacuse its in a categorie or in a term.
as for my other topic since i’ve changed activiate results dropdown on 1 hit and show loading on suggestion box alot of people wait for the results. thx for this tip!
-
This reply was modified 5 years, 7 months ago by
skempenaar.
October 21, 2020 at 9:47 am #29936skempenaar
Participantshould date descending in secondary ordering after Relavance not fix this since the products is added later and is newer?
-
This reply was modified 5 years, 7 months ago by
skempenaar.
October 21, 2020 at 12:10 pm #29946Ernest Marcinko
KeymasterThe reason is, that is has priority 101 and the other results 100: https://i.imgur.com/08XL3ru.png
Matches with the higher priority will be always shown first – but only if they match, and regardless of what the phrase is.October 21, 2020 at 1:02 pm #29952skempenaar
Participantthx for clearing this. the image is very helpfull. is there a way to influance the default sorting then? since the priority option is way to powerfull for what we want.
for example:
the second result on top. why? because it’s a new title and our publishers want to sell this one more then the other.current setting
Primary ordering: Relevance i believe this is the best option since it always shows the results that a costumer wants.
Secondary ordering: Date descending. i hoped this would change the order the way we want it.If two elements match the primary ordering criteria, the Secondary ordering is used.
-
This reply was modified 5 years, 7 months ago by
skempenaar.
October 22, 2020 at 12:35 pm #29965Ernest Marcinko
KeymasterWell, I’m afraid the only way in this case by making a direct modification to the core plugin code, but I am not sure if in that case it is possible, as the index table has a hard time working with exact matches.
Anyways, please try this modification:
1. Open the wp-content/plugins/ajax-search-pro/includes/classes/search/class-asp-search-indextable.php file on your server
2. Replace it’s contents with this
3. Save and clear all caches
If all goes well, this may boost the exact title relevances. Please be careful, I was not able to test this modification yet.October 22, 2020 at 5:12 pm #29967skempenaar
Participantthx i believe this works!. this is wound work as a snippet in functions or copy the file to child theme?
on our testserver im getting this error in debug mode
Warning: count(): Parameter must be an array or an object that implements Countable in /mnt/env/rjvps/development/public_html/wp-content/plugins/ajax-search-pro/includes/classes/search/class-asp-search-indextable.php on line 475
October 23, 2020 at 8:17 am #29975Ernest Marcinko
KeymasterI think I just made a mistake there, that causes the error, this variation should remove that.
This does not work as a custom code snippet unfortunately. But I think this is going to be a permanent change in the upcoming release, so you don’t have to worry about it.
October 23, 2020 at 9:25 am #29980skempenaar
Participantbrilliant. works like charm!. i think its a very good update for the plugin:)
-
This reply was modified 5 years, 7 months ago by
-
AuthorPosts
- You must be logged in to reply to this topic.