I want to check documents with media_url == '' || media_url == null media_url == '' || media_url == null . I have a request:
{ "engagements": [ "blah" ], "query": { "from": 0, "size": 2, "sort": [ { "bookmarked": { "order": "desc" } }, { "created_at": { "order": "desc" } } ], "facets": {}, "query": { "filtered": { "query": { "match_all": {} }, "filter": { "bool": { "must": [ { "term": { "car_id": "78778" } }, { "range": { "created_at": { "gte": "2015-04-12T04:00:00.000Z", "lte": "2015-05-13T03:59:59.999Z" } } }, { "term": { "media_url": "" } } ], "should": [ { "term": { "bookmarked": false } } ] } } } }, "aggregations": { "word_frequencies": { "terms": { "field": "text", "size": 150 } } }, "highlight": { "fields": { "text": { "fragment_size": 1500 } } } }, "api": "_search" }
However, if I do what I do above, then entries that are null will not be returned. What should I do to return records with "either" or "zero" as the value of media_url?
source share