I have an index with ~122 million documents. Some of the fields don't seem to be working with the exists query. For example, I have a doc like the following (many other fields omitted for brevity):
curl -XGET 'http://myes.com/my_index/my_docs/1000022379001'
{"_index":"my_index","_type":"my_docs","_id":"1000022379001","_version":4,"found":true,"_source":{"account_id":"782847669001","projection":"something"}}
But when I search all docs where projection exists, I get 0 hits:
curl -XGET 'http://myes.com/my_index/my_docs/_search?pretty' -d '
> {
> "query": {
> "exists": { "field": "projection" }
> }
> }
> '
{
"took" : 3,
"timed_out" : false,
"_shards" : {
"total" : 24,
"successful" : 24,
"failed" : 0
},
"hits" : {
"total" : 0,
"max_score" : null,
"hits" : [ ]
}
}
The mapping for the projection field is:
"projection": {
"type": "keyword",
"doc_values": false
},
Any thoughts or ideas on why this isn't working? Am I missing something?
Thanks,
Scott