# Get words used in Query String

**URL:** <https://discuss.elastic.co/t/get-words-used-in-query-string/43193>\
**Category:** Elasticsearch\
**Created:** [March 2, 2016, 5:45am UTC](https://discuss.elastic.co/t/get-words-used-in-query-string/43193 "2016-03-02T05:45:48Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Patrick\_Lam](https://avatars.discourse-cdn.com/v4/letter/p/ed8c4c/32.png) [@Patrick\_Lam](https://discuss.elastic.co/u/Patrick_Lam)\
**Post date:** [March 2, 2016, 5:45am UTC](https://discuss.elastic.co/t/get-words-used-in-query-string/43193/1 "2016-03-02T05:45:49Z")

</div>

Hi,

Is there a way (possibly leveraging the built-in query parser) to easily get the original words that were used in a Query String Query? For example, if I send the following query string as a query:

boston AND ("red sox" OR celtics)

I would like to return a list of ["boston", "red sox", "celtics"] or something similar. Is there an easy way to do this?

---

<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 5, 2017, 11:12pm UTC](https://discuss.elastic.co/t/get-words-used-in-query-string/43193/2 "2017-07-05T23:12:13Z")

</div>

Closed on July 5, 2017, 11:12pm UTC


