# How to write prefix query in query\_string query

**URL:** <https://discuss.elastic.co/t/how-to-write-prefix-query-in-query-string-query/184093>\
**Category:** Elasticsearch\
**Created:** [June 4, 2019, 6:03am UTC](https://discuss.elastic.co/t/how-to-write-prefix-query-in-query-string-query/184093 "2019-06-04T06:03:21Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![hexer338](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/hexer338/32/47413_2.png) [@hexer338](https://discuss.elastic.co/u/hexer338)\
**Post date:** [June 4, 2019, 6:03am UTC](https://discuss.elastic.co/t/how-to-write-prefix-query-in-query-string-query/184093/1 "2019-06-04T06:03:21Z")

</div>

Hi, I want to combine prefix query on a field with another query in query\_string query.  
Can you please tell me how to do that ? So far I haven't been able to find any example to specify the queryType(eg. prefix query) inside query\_string query.

Thanks

---

<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 2, 2019, 6:03am UTC](https://discuss.elastic.co/t/how-to-write-prefix-query-in-query-string-query/184093/2 "2019-07-02T06:03:37Z")

</div>

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