# Query\_string query not matching on date field

**URL:** <https://discuss.elastic.co/t/query-string-query-not-matching-on-date-field/129210>\
**Category:** Elasticsearch\
**Created:** [April 24, 2018, 3:59am UTC](https://discuss.elastic.co/t/query-string-query-not-matching-on-date-field/129210 "2018-04-24T03:59:53Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Gabriel\_Skoropada](https://avatars.discourse-cdn.com/v4/letter/g/48db29/32.png) [@Gabriel\_Skoropada](https://discuss.elastic.co/u/Gabriel_Skoropada)\
**Post date:** [April 24, 2018, 3:59am UTC](https://discuss.elastic.co/t/query-string-query-not-matching-on-date-field/129210/1 "2018-04-24T03:59:53Z")

</div>

Our app is using a bool query that may have a`query_string` string query in it.

When searching for date values I get no results from the `query_string` query but if I use a `range` query it works. Those two queries come from different UX parts (a general purpose query input for the `query_string` query and a date picker for the `range` query).

Having the app match documents consistently using both input methods would greatly improve the user experience.

So far I have tried entering the date in the `query_string` in different formats, even copying and pasting a value from the index, using a more complex `query_string` selecting one of the date fields and adding a multifield dynamic mapping for `date` fields.

Any suggestions on how to make the `query_string` query match documents based on a `date` field?

Thanks for any help you can provide.

---

<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:** [May 22, 2018, 3:59am UTC](https://discuss.elastic.co/t/query-string-query-not-matching-on-date-field/129210/2 "2018-05-22T03:59:55Z")

</div>

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