Hello all,
I've just noticed that ES search queries are not returning complete data anymore. It could be related to my upgrade from 1.5.2 to 1.6.0, but maybe not. I'm not sure what has changed that would cause this.
I have an index with 3 _types that I validate by querying the mapping API:
{
"myindex-20150706" : {
"mappings" : {
"hotel_avail_dwarf4bookingcomplugin" : { mapping snip.... },
"http_access_dwarf4bookingcomplugin" : { mapping snip.... },
"perf_dwarf4bookingcomplugin" : { mapping snip..... }
}
}
}
When I send this basic query to ES:
curl -XGET 'http://myhost:9200/myindex/_search?pretty ' -d '{
"facets": {
"terms": {
"terms": {
"field": "_type",
"size": 100,
"order": "count",
"exclude": []
},
"facet_filter": {
"fquery": {
"query": {
"filtered": {
"query": {
"bool": {
"should": [
{
"query_string": {
"query": "*"
}
}
]
}
},
"filter": {
"bool": {
"must": [
{
"range": {
"@timestamp": {
"from": 1436192919014,
"to": 1436196519014
}
}
}
]
}
}
}
}
}
}
}
},
"size": 0
}'
I only get one type returned:
{
"took" : 5379,
"timed_out" : false,
"_shards" : {
"total" : 6,
"successful" : 6,
"failed" : 0
},
"hits" : {
"total" : 361249580,
"max_score" : 0.0,
"hits" : [ ]
},
"facets" : {
"terms" : {
"_type" : "terms",
"missing" : 0,
"total" : 29362,
"other" : 0,
"terms" : [ {
"term" : "perf_dwarf4bookingcomplugin",
"count" : 29362
} ]
}
}
}
When I query the index status API, it tells me that I have 369183728 documents in the index, so I know there is more data than what is coming back from my query, presumably in the _types that are not being returned.
curl -XGET 'http://myhost:9200/myindex-20150706/_status?pretty' | less
{
"_shards" : {
"total" : 12,
"successful" : 12,
"failed" : 0
},
"indices" : {
"myindex-20150706" : {
"index" : {
"primary_size_in_bytes" : 51574050317,
"size_in_bytes" : 103209014450
},
"translog" : {
"operations" : 3068301
},
"docs" : {
"num_docs" : 369183728,
"max_doc" : 369183728,
"deleted_docs" : 0
}, (snip....)
This is very strange, and I'm wondering if it might be a bug? Or maybe something funky in the mapping? I honestly don't think any mapping has changed though, and this used to work as expected.
Is there a reason this should not work?
Thanks again for the time.
Chris