given that there is a field in the elastic mapping, not all the entries have thie field, for example, some entries have following value
"intvalue" : [200, 201, 202] "intvalue" : [200, 203, 204]
but some entries do not have intvalue field
I want to write a query to search the entries having values(for example, 200, 202), the query contains
{"terms":{"intvalue":[200,202],"boost":1.0}}
it will only return the results containing the value as example above.
is it possible that the query can return all the entries having the value or do not have the field, for example, I have 4 entries below
Entry A: "intvalue" : [200, 201] Entry B "intvalue" : [200, 203] Entry C "intvalue" : [] Entry D "intvalue" : [204, 205]
then the query {"terms":{"intvalue":[200,202],"boost":1.0}} shoudl return Entry A B, C