# Date range query wrong results

**URL:** <https://discuss.elastic.co/t/date-range-query-wrong-results/102548>\
**Category:** Elasticsearch\
**Created:** [October 3, 2017, 11:25am UTC](https://discuss.elastic.co/t/date-range-query-wrong-results/102548 "2017-10-03T11:25:16Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Delegen\_Admin](https://avatars.discourse-cdn.com/v4/letter/d/c2a13f/32.png) [@Delegen\_Admin](https://discuss.elastic.co/u/Delegen_Admin)\
**Post date:** [October 3, 2017, 11:25am UTC](https://discuss.elastic.co/t/date-range-query-wrong-results/102548/1 "2017-10-03T11:25:16Z")

</div>

When submitting the query below (also mapping attached), we are getting all records indexed, instead of only the records between the date range.

**Query:**  
{"query": {"range" : { "status\_changed\_date" : { "gte": "02/10/17 10:33:32" } } }}

**Mappings:**  
{  
"green" : {  
"mappings" : {  
"location" : {  
"properties" : {  
"contactMethod" : {  
"type" : "text",  
"fields" : {  
"keyword" : {  
"type" : "keyword",  
"ignore\_above" : 256  
}  
}  
},  
"lat" : {  
"type" : "float"  
},  
"lng" : {  
"type" : "float"  
},  
"name" : {  
"type" : "text",  
"fields" : {  
"keyword" : {  
"type" : "keyword",  
"ignore\_above" : 256  
}  
}  
},  
"phoneNums" : {  
"type" : "text",  
"fields" : {  
"keyword" : {  
"type" : "keyword",  
"ignore\_above" : 256  
}  
}  
},  
"status" : {  
"type" : "text",  
"fields" : {  
"keyword" : {  
"type" : "keyword",  
"ignore\_above" : 256  
}  
}  
},  
"status\_changed\_date" : {  
"type" : "date",  
"format" : "dd/MM/yy HH:mm:ss"  
}  
}  
}  
}  
}  
}

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [October 31, 2017, 11:25am UTC](https://discuss.elastic.co/t/date-range-query-wrong-results/102548/2 "2017-10-31T11:25:29Z")

</div>

Closed on October 31, 2017, 11:25am UTC

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