How to add multiple exists fields with OR operation in elasticsearch -
i have following query:
{ "query": { "exists": { "field": "field1" } } }
i query modified in way add filter existing field having 'or' operation between them.
any idea how so?
thanks.
you can use bool query should
.
{ "query": { "bool": { "should": [{ "exists": { "field": "field1" } }, { "exists": { "field": "field2" } } ] } } }
wiki
Comments
Post a Comment