# Failed to parse query error

**URL:** <https://discuss.elastic.co/t/failed-to-parse-query-error/45777>\
**Category:** Kibana\
**Created:** [March 30, 2016, 10:28am UTC](https://discuss.elastic.co/t/failed-to-parse-query-error/45777 "2016-03-30T10:28:26Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jpuch](https://avatars.discourse-cdn.com/v4/letter/j/ccd318/32.png) [@Jpuch](https://discuss.elastic.co/u/Jpuch)\
**Post date:** [March 30, 2016, 10:28am UTC](https://discuss.elastic.co/t/failed-to-parse-query-error/45777/1 "2016-03-30T10:28:26Z")

</div>

Hi,

I have this kind of data in my ES :

 ![](https://us1.discourse-cdn.com/elastic/original/2X/0/0ef2ece6ca1fa334c87b5e9004ca486d63bbbded.JPG)

i'd like to make more precise research by date : e;g; 2016-06-23

=\> when i try this, the datas don't match the data i took.  
=\> when i try with the exact time : e.g 2016-06-23 15:17:13. I have the **Discover: Failed to parse query [2014-06-23 15:17:13]** error.

EDIT : I got this message when i click on more info :

> Error: Request to Elasticsearch failed: {"error":{"root\_cause":[{"type":"query\_parsing\_exception","reason":"Failed to parse query [2016-03-07T11:45:34.520Z]","index":"repartition","line":1,"col":157}],"type":"search\_phase\_execution\_exception","reason":"all shards failed","phase":"query","grouped":true,"failed\_shards":[{"shard":0,"index":"repartition","node":"J89YOGLZS5uRIl\_Z7ZoEuw","reason":{"type":"query\_parsing\_exception","reason":"Failed to parse query [2016-03-07T11:45:34.520Z]","index":"repartition","line":1,"col":157,"caused\_by":{"type":"parse\_exception","reason":"Cannot parse '2016-03-07T11:45:34.520Z': Encountered " ":" ": "" at line 1, column 16.\nWas expecting one of:\n \n ...\n ...\n ...\n "+" ...\n "-" ...\n ...\n "(" ...\n "_" ...\n "^" ...\n ...\n ...\n \<FUZZY\_SLOP\> ...\n ...\n ...\n ...\n "[" ...\n "{" ...\n ...\n ","caused\_by":{"type":"parse\_exception","reason":"Encountered " ":" ": "" at line 1, column 16.\nWas expecting one of:\n \n ...\n ...\n ...\n "+" ...\n "-" ...\n ...\n "(" ...\n "_" ...\n "^" ...\n ...\n ...\n \<FUZZY\_SLOP\> ...\n ...\n ...\n ...\n "[" ...\n "{" ...\n ...\n "}}}}]}}  
> Error  
> at KbnError ([http://10.33.2.23/bundles/commons.bundle.js?v=9732:57416:8](http://10.33.2.23/bundles/commons.bundle.js?v=9732:57416:8))  
> at RequestFailure ([http://10.33.2.23/bundles/commons.bundle.js?v=9732:57449:6](http://10.33.2.23/bundles/commons.bundle.js?v=9732:57449:6))  
> at Anonymous function ([http://10.33.2.23/bundles/kibana.bundle.js?v=9732:79009:14](http://10.33.2.23/bundles/kibana.bundle.js?v=9732:79009:14))  
> at Promise[try] ([http://10.33.2.23/bundles/commons.bundle.js?v=9732:61111:12](http://10.33.2.23/bundles/commons.bundle.js?v=9732:61111:12))  
> at Anonymous function ([http://10.33.2.23/bundles/commons.bundle.js?v=9732:61080:10](http://10.33.2.23/bundles/commons.bundle.js?v=9732:61080:10))  
> at Array.prototype.map (native code)  
> at Promise.map ([http://10.33.2.23/bundles/commons.bundle.js?v=9732:61079:8](http://10.33.2.23/bundles/commons.bundle.js?v=9732:61079:8))  
> at callResponseHandlers ([http://10.33.2.23/bundles/kibana.bundle.js?v=9732:78981:8](http://10.33.2.23/bundles/kibana.bundle.js?v=9732:78981:8))  
> at Anonymous function ([http://10.33.2.23/bundles/kibana.bundle.js?v=9732:78488:10](http://10.33.2.23/bundles/kibana.bundle.js?v=9732:78488:10))  
> at processQueue ([http://10.33.2.23/bundles/commons.bundle.js?v=9732:42357:12](http://10.33.2.23/bundles/commons.bundle.js?v=9732:42357:12))

How can i fix this ?

Thanks for help

---

<div class="post-metadata">

**Author:** ![spalger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/spalger/32/14092_2.png) [@spalger](https://discuss.elastic.co/u/spalger)\
**Post date:** [March 30, 2016, 4:56pm UTC](https://discuss.elastic.co/t/failed-to-parse-query-error/45777/2 "2016-03-30T16:56:09Z")

</div>

using brackets/`[]` in a query indicates to elasticsearch that you're trying to specify a range. I suggest reading up on the query syntax here: [https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-query-string-query.html#query-string-syntax](https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-query-string-query.html#query-string-syntax)

---

<div class="post-metadata">

**Author:** ![Jpuch](https://avatars.discourse-cdn.com/v4/letter/j/ccd318/32.png) [@Jpuch](https://discuss.elastic.co/u/Jpuch)\
**Post date:** [March 31, 2016, 7:50am UTC](https://discuss.elastic.co/t/failed-to-parse-query-error/45777/3 "2016-03-31T07:50:52Z")

</div>

Thanks for the awnser, it works better now 🙂  
Juste one more question, i don't find it in the doc, i can pick a day e.g: for the 2013-07-09 the query is : date:[2013-07-29 TO 2013-07-30] .

Is there an easier format for picking only one day ? like removing the 2013-07-30

---

<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:57pm UTC](https://discuss.elastic.co/t/failed-to-parse-query-error/45777/4 "2017-07-06T13:57:20Z")

</div>


