Home › Forums › Product Support Forums › Ajax Search Pro for WordPress Support › Ordering result article numbers › Reply To: Ordering result article numbers
Hi,
Thank you for the details. I have checked the configuration, and both the primary and secondary ordering is set to by ‘relevance’ as default. However you want to order the results by ‘_sku’ as well as relevance.
I have made the following changes:
– Secondary ordering set to ‘_sku’: https://i.imgur.com/UCd8xQe.png
– Custom field relevance set to 0: https://i.imgur.com/3GmmPF6.png
Explanation
This is sort of a strange configuration at first, but it should do the trick. By changing the custom field relevance to 0, the _sku fields do no longer affect the primary ordering (the relevance itself). But since ‘201120’ only matches the ‘_sku’ field, the primary ‘relevance’ ordering has no effect, as all items have the same relevance. Because of that, the secondary ordering is used, which re-orders the results by the ‘_sku’ field.
This should more likely give you the expected ordering in most case, however it is not perfect by any means.
I hope this helps!