Replies: 3 comments
-
We have now created a NestedSort class in our own code base to get our previous implemented nested sort working again, but I think it would be also nice for others to implement Elastic nested sort and also other possible sort stuff like geo location into spatie/elasticsearch-query-builder itself.
With this NestedSort class we could do now something like this to build our sorting, which is not an ideal solution, because it would be better to have a Sort interface which is used by all possible Elastic sort implementations.
|
Beta Was this translation helpful? Give feedback.
-
This discussion can now be closed as |
Beta Was this translation helpful? Give feedback.
-
Works like a charm. After upgrading from 1.x to 3.x it was possible to remove our custom NestedSort code in our project. |
Beta Was this translation helpful? Give feedback.
-
Has anyone managed to implement a nested sort via spatie/elasticsearch-query-builder?
https://www.elastic.co/guide/en/elasticsearch/reference/8.13/sort-search-results.html#nested-sorting
We previously used ONGR\ElasticsearchDSL (https://github.com/ongr-io/ElasticsearchDSL) where it was possible to add nested filtering to a sort, which seems to be not provided by spatie/elasticsearch-query-builder yet.
Beta Was this translation helpful? Give feedback.
All reactions