Skip to content
Advertisement

SQL Where clause equivalent for Elastic Search

I am trying to create a aggregate results in elastic search but filter option is not working for me.

I can aggregate data without filter e.g.

but I am facing problems to write equivalent DSL query of :

Advertisement

Answer

Should be something like this:

Use a filter if you know the exact value and do not need a match, else use a match query instead of the filtered query.

User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement