Elasticsearch: exists filter not working -


here data ...

{"score":60,"name":"bill"}, {"score":50,"name":"john"}, {"score":null,"name":"sam"} 

i looking write filter range query, should include null values.

i tried ... , expecting 3 results, returned 0 results ... ?

"filter": {             "bool": {               "must": [                 {                   "range": {                     "score": {                       "lte": 100                     }                   }                 },                 {                   "exists": {                     "field": "score"                   }                 }               ]             }           } 

any appreciated ... thanks

what need have bool/should either range query or missing score field

{   "query": {     "bool": {       "should": [         {           "range": {             "score": {               "lte": 100             }           }         },         {           "bool": {             "must_not": {               "exists": {                 "field": "score"               }             }           }         }       ]     }   } } 

Comments

Popular posts from this blog

javascript - Create a stacked percentage column -

Optimising Firebase database by automatically overwriting data -

javascript - Angular UI-Grid customTemplate directive causing rows to load slowly/? -