# Type date bugs while searching

**URL:** <https://discuss.elastic.co/t/type-date-bugs-while-searching/17697>\
**Category:** Elasticsearch\
**Created:** [May 23, 2014, 3:38pm UTC](https://discuss.elastic.co/t/type-date-bugs-while-searching/17697 "2014-05-23T15:38:11Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Zealot\_Yin](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/zealot_yin/32/1538_2.png) [@Zealot\_Yin](https://discuss.elastic.co/u/Zealot_Yin)\
**Post date:** [May 23, 2014, 3:38pm UTC](https://discuss.elastic.co/t/type-date-bugs-while-searching/17697/1 "2014-05-23T15:38:11Z")

</div>

i definded  
"logtime": {  
"type" : "date",  
"format" : "MM-dd HH:mm:ss"  
,"index": "not\_analyzed"  
}

i can using searching "from": 1400854131, "to": "now", and get i correct  
result,  
{  
"facets": {  
....  
"filter": {  
"bool": {  
"must": [  
{  
"range": {  
"logtime": {  
"from": 1400854131,  
"to": "now"  
}  
}  
...  
}  
but when i use "from": 1400854131, "to": 1400854381 i get nothing  
(there are a lot of docment during this time)  
and when i use "from": 1400854131212, "to": now, i get nothing too (kibana  
searching in this way)

i'm using version 1.1.1 is there a solution to solve this problem?

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/314e085d-5719-4686-820d-ff7e44ebba54%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/314e085d-5719-4686-820d-ff7e44ebba54%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![Zealot\_Yin](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/zealot_yin/32/1538_2.png) [@Zealot\_Yin](https://discuss.elastic.co/u/Zealot_Yin)\
**Post date:** [May 24, 2014, 3:24am UTC](https://discuss.elastic.co/t/type-date-bugs-while-searching/17697/2 "2014-05-24T03:24:20Z")

</div>

I found 1.1.2 mentioned fix some problem about query/filter on dates  
but i tried 1.2.0 the problem is still there. is there a solution to solve  
this problem?

- v1.1.2 release notes
- Query API: Range/Term query/filter on dates fail to handle numbers  
properly #5969[http://github.com/elasticsearch/elasticsearch/issues/issue/5969](http://github.com/elasticsearch/elasticsearch/issues/issue/5969)

On Friday, May 23, 2014 11:38:11 PM UTC+8, Zealot Yin wrote:

> i definded  
> "logtime": {  
> "type" : "date",  
> "format" : "MM-dd HH:mm:ss"  
> ,"index": "not\_analyzed"  
> }
> 
> i can using searching "from": 1400854131, "to": "now", and get i  
> correct result,  
> {  
> "facets": {  
> ....  
> "filter": {  
> "bool": {  
> "must": [  
> {  
> "range": {  
> "logtime": {  
> "from": 1400854131,  
> "to": "now"  
> }  
> }  
> ...  
> }  
> but when i use "from": 1400854131, "to": 1400854381 i get nothing  
> (there are a lot of docment during this time)  
> and when i use "from": 1400854131212, "to": now, i get nothing too  
> (kibana searching in this way)
> 
> i'm using version 1.1.1 is there a solution to solve this problem?

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/82061bf6-2d0d-4814-a32d-efb2da2874f3%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/82061bf6-2d0d-4814-a32d-efb2da2874f3%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<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:** [July 6, 2017, 1:27am UTC](https://discuss.elastic.co/t/type-date-bugs-while-searching/17697/3 "2017-07-06T01:27:15Z")

</div>


