Search: Maintain ordering of Aggregations between code and display in widget #8096
Labels
[Feature] Search
For all things related to Search
[Type] Bug
When a feature is broken and / or not performing as intended
Steps to reproduce the issue
Apply filters (Aggregations) by using the
Jetpack_Search::set_filters()
function, then run a search and observe the ordering of the filters as displaying in the Widget - they can be out of order.What I expected
The ordering of the Aggregations as presented in the Widget should match the ordering from the
Jetpack_Search::set_filters()
call.What happened instead
Random ordering in Widget.
Fix
This is fixed on dotcom but needs to come over. ES 2.x doesn't seem to return Aggregations in the same order in which they were passed in the query, where Facets used to be returned in the same order.
Just need a few lines of code to recreate the result array, in the right order.
The text was updated successfully, but these errors were encountered: