Open f3l1xss opened 4 years ago
Pinging @elastic/es-search (:Search/Search)
Hi, anybody looking into this?
Hello what do you guys think about this? @jimczi @dliappis
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.