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

Popular posts from this blog

Asterisk AGI Python Script to Dialplan does not work -

kotlin - Out-projected type in generic interface prohibits the use of metod with generic parameter -

python - Read npy file directly from S3 StreamingBody -