Algolia’s sort of numeric facet by alphabetical order is wrong
3 years, 5 months ago #19118
I downloaded WP Solr yesterday, and it has been a great help. Thank you so much.
I am using it with Algolia. I have a site that has facets on the sidebar that let the user find parts of the Bible. The problem I am running into is the sorting of the attributes. In the link below, I want to:
1) put the books in biblical order (Genesis, Exodus, Leviticus).
2) put the chapters in numerical order. Right now it sorts 1, 10, 119, 13, 145.
I know Algolia restricts to ordering by alphabetical or by count. In their documentation for instantsearch.js they indicate that there is a way to specify order, but that doesn’t necessarily apply here. https://discourse.algolia.com/t/sorting-in-facets/7709
What are my options?3 years, 5 months ago #19121
I was incorrect – “book” was sorted alphabetical correctly.3 years, 5 months ago #19128
1) Please deactivate the WPSOLR plugin, and remove it. Upload the new version with the fix, and activate it.
2) Please change to type “Integer” for your “Chapter” field in your screen 2.2 and reindex everything, if the type was a string.
The fix is detecting fields indexed with a numeric type in screen 2.2 (“Integer” for “Chapter”) with a facet with alphabetical sort. It then reorders the facet content correctly.
You must be logged in to reply to this topic.