Elasticsearch Search return blank results

I have an index with 1.9 billion data. When I try to do a search, it always return a blank result which is "". But the HTTP status code is 200. Then I just don't know what happens.

Did anyone ever have this problem? Or anyone knows what happens? Thanks!

My query clause is as below.

{
"size": 0,
"query": {
	"bool": {
		"filter": [{
			"range": {
				"timestamp": {
					"gte": 1523059200,
					"lt": 1523145600
				}
			}
		}]
	}
},
"aggs": {
	"duplications": {
		"terms": {
			"field": "hash",
			"size": 5000
		},
		"aggs": {
			"top_duplications": {
				"top_hits": {
					"size": 3
				}
			}
		}
	}
}

}

Hey,

I assume that with return a blink result which is "" you mean, the number of hits is zero?

Can you change the timestamp query to be a date in ISO8601 format? By default the date format is also epoch_millis but you seem to be using epoch seconds, which means you date may be off a lot. One of the reasons why you should try using a human readable date, it is much easier to debug.

--Alex

Hi Alex

Thanks for your reply.

Actually, this query works fine when the data is less than 10 billion. But after the data increased, it returns blank result. The blank result mean nothing, which is only an empty string. I expect to see some error information if it's failed to execute. But nothing!

Regards
Bruce

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.