# Match all fields tokens

**URL:** https://discuss.elastic.co/t/match-all-fields-tokens/256546
**Category:** Elasticsearch
**Created:** [November 24, 2020, 5:07pm UTC](https://discuss.elastic.co/t/match-all-fields-tokens/256546 "2020-11-24T17:07:01Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Anton00](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/anton00/32/79632_2.png) [@Anton00](https://discuss.elastic.co/u/Anton00)
#### Post date: [November 24, 2020, 5:07pm UTC](https://discuss.elastic.co/t/match-all-fields-tokens/256546/1 "2020-11-24T17:07:01Z")

</div>

I want to have match when all tokens from query match all field token. For example: field contains text "Red Blue Green" and query that match it should contain 3 token in any order "red", "blue", "green". I've searched and found that it was impossible to do, still no way to do it directly?  
Now I do it in 2 step - first analyze the query and save a number of tokens then match the number to token\_count field.

---

<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: [December 22, 2020, 5:07pm UTC](https://discuss.elastic.co/t/match-all-fields-tokens/256546/2 "2020-12-22T17:07:03Z")

</div>

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