# Searching with multiple tokens in the query

**URL:** https://discuss.elastic.co/t/searching-with-multiple-tokens-in-the-query/10706
**Category:** Elasticsearch
**Created:** [February 12, 2013, 3:07am UTC](https://discuss.elastic.co/t/searching-with-multiple-tokens-in-the-query/10706 "2013-02-12T03:07:46Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Dave\_Lee](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dave_lee/32/2492_2.png) [@Dave\_Lee](https://discuss.elastic.co/u/Dave_Lee)
#### Post date: [February 12, 2013, 3:07am UTC](https://discuss.elastic.co/t/searching-with-multiple-tokens-in-the-query/10706/1 "2013-02-12T03:07:46Z")

</div>

I would like to be able to search for multiple tokens at once. Currently it  
is only matching the entire query. However, I would like to search each  
query individually as well so if my query string is "quick brown fox" I  
will get documents matching the whole string but also document that may  
have only one or two of the keywords, regardless of order.

What is the best way to accomplish this?

--  
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).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

### Author: ![Clinton\_Gormley](https://avatars.discourse-cdn.com/v4/letter/c/50afbb/32.png) [@Clinton\_Gormley](https://discuss.elastic.co/u/Clinton_Gormley)
#### Post date: [February 12, 2013, 11:42am UTC](https://discuss.elastic.co/t/searching-with-multiple-tokens-in-the-query/10706/2 "2013-02-12T11:42:13Z")

</div>

On Mon, 2013-02-11 at 19:07 -0800, Dave Lee wrote:

> I would like to be able to search for multiple tokens at once.  
> Currently it is only matching the entire query. However, I would like  
> to search each query individually as well so if my query string is  
> "quick brown fox" I will get documents matching the whole string but  
> also document that may have only one or two of the keywords,  
> regardless of order.

Use a "match" query.

clint

--  
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).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<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, 2:51am UTC](https://discuss.elastic.co/t/searching-with-multiple-tokens-in-the-query/10706/3 "2017-07-06T02:51:55Z")

</div>


