-
Notifications
You must be signed in to change notification settings - Fork 114
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
Conditional filtering #282
Comments
I reworked my nested document to combined the
After manually searching with the dev_tools in kibana, my taget request will be this:
Is it possible to achieve with the current implementation of NesteedFilter or should I create a custom filter to do this? |
I made a new FilterBackend to be able to group filters on a specific nested, here is the code. Let me know if you think it could be integrated in the lib. New
|
Hi,
I have a document/index 'companies' which contains multiple
annual_accounts
entities which contain multiplefields
and aclosing_year
. Eachfields
has avalue
and acode
.I want to retrieve companies which have an
annual_accounts.closing_year
equals to 2020 AND for thisannual_accounts
element afields
with code "AA" AND for the samefields
a value greater than 1,000,000.Here is the elasticsearch query generated:
What is the best way to do this kind of filtering?
Is the way is to create an index for
fields
to being able to filter the 2 conditions (code
andvalue
)? If this is a solution how can I link the field to anannual_accounts
and acompany
in another index?The text was updated successfully, but these errors were encountered: