How to query documents for a field to be null?

Aren't {"x": "blah", "y": null}, AND, {"x": "blah"} two different
JSON obejcts ? Shouldn't a json document with a field having value
null should be treated differently then a json document which is
missing the field all together ?
It seems that elasticsearch's "missing" filter treats json value
"null" as equivalent to absence of field. Is this the desired
behavior ?

On Mar 28, 3:31 am, Shay Banon kim...@gmail.com wrote:

Mmm, wondering if we can do that automatically and translate term query /
filter against null to missing one where applicable. Can you open an issue?

On Tue, Mar 27, 2012 at 9:58 PM, Ali Loghmani loghm...@gmail.com wrote:

cool, easy :wink:

On Monday, March 26, 2012 6:47:53 PM UTC-7, Ali Loghmani wrote:

I am trying to run a query like below:
{"query" : {"term" : { "my_field": null } } }

but it seems that it is not working, it does not return anything (using
the curl command and also the HEAD plugin).

Thanks,
Ali