Add filter to nested sort
Type of change
-
Bug Fix -
Feature
Please provide link to gitlab issue or ADR(Architecture Decision Record)
Changes related to ADR #106 (closed)
Does this introduce a change in the core logic?
- [NO]
Does this introduce a change in the cloud provider implementation, if so which cloud?
-
AWS -
Azure -
Google Cloud -
IBM
Does this introduce a breaking change?
- [NO]
What is the current behavior?
Currently specifying filter for nested sorting is not possible.
What is the new/expected behavior?
Users can pass filter for nested field sorting. From official docs A filter that the inner objects inside the nested path should match with in order for its field values to be taken into account by sorting. Common case is to repeat the query / filter inside the nested filter or query.
Filter is applied to the "first" nested level in the case of sort field being nested multiple times. Related Elastic feature docs: https://www.elastic.co/guide/en/elasticsearch/reference/7.17/sort-search-results.html#nested-sorting
Have you added/updated Unit Tests and Integration Tests?
Unit tests have been added/updated.
Any other useful information
parseSort method is only used in byoc-provider so that's why only this provider has changed. Others use getSortQuery which has signature unchanged