# Elasticsearch API Search query does not give correct results between timestamp range

**URL:** <https://discuss.elastic.co/t/elasticsearch-api-search-query-does-not-give-correct-results-between-timestamp-range/268786>\
**Category:** Elasticsearch\
**Created:** [March 30, 2021, 12:18pm UTC](https://discuss.elastic.co/t/elasticsearch-api-search-query-does-not-give-correct-results-between-timestamp-range/268786 "2021-03-30T12:18:27Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![stephenb](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stephenb/32/40856_2.png) [@stephenb](https://discuss.elastic.co/u/stephenb)\
**Post date:** [March 30, 2021, 2:01pm UTC](https://discuss.elastic.co/t/elasticsearch-api-search-query-does-not-give-correct-results-between-timestamp-range/268786/2 "2021-03-30T14:01:25Z")

</div>

Please do not open more than 1 thread on the same topic.

> [@Elasticsearch query time range issue](https://discuss.elastic.co/t/elasticsearch-query-time-range-issue/268672):
>
> Hello Experts, I am not able to retrieve all the status\_code values with below query. It has given only less value than actual values. \*\*My query\*\* "\_source": ["status\_code", "referrer", "timestamp"], "query": { "bool": { "should": [ { "match": { "referrer": ".\*" } }, { "range" : { "timestamp" : { "gte": "2021-03-28T06:00:00.000Z…

Please continue the discussion in that thread.

Please provide a set of sample data and sample that were not returned.

---

_[View the full topic](https://discuss.elastic.co/t/elasticsearch-api-search-query-does-not-give-correct-results-between-timestamp-range/268786)._
