-
Notifications
You must be signed in to change notification settings - Fork 24.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ability to perform Nested Sort Like filtering #51818
Comments
Pinging @elastic/es-search (:Search/Search) |
Hi, anybody looking into this? |
Is there any update on this issue? It would be great to have this functionality enabled. It used to work in v5.6, nested objects could be accessed via _source variable in a filter, but updating to v7 it stopped working and seems there's no way to have this done now. |
@MarinaRNext I have been waiting for 6 mths and there has been no response at all. So strange as this functionality seem pretty basic to me |
Pinging @elastic/es-search (Team:Search) |
Pinging @elastic/es-search-relevance (Team:Search Relevance) |
Currently we have nested sort functionality where we are able to specify filter logic, path, sortMode (min, max, sum, avg, median).
https://www.elastic.co/guide/en/elasticsearch/reference/6.8/search-request-sort.html#nested-sorting
It would be wonderful if there can be similar functionality for filtering where we can specify above parameters + boolean expression to evaluate whether the doc is valid.
For Example given mapping below:
and documents:
I could easily search for doc which has Sum of Toyota value greater than 100 by setting filter logic as 'term: brand= toyota', path: cars, filterMode: sum, boolean expression: totalSum > 100
Theoretically, we can achieve the same thing using script query. However, I realized that in filter context
https://www.elastic.co/guide/en/elasticsearch/painless/master/painless-filter-context.html
_source is not available, only doc values which prohibit us from accessing nested fields.
The text was updated successfully, but these errors were encountered: