# Search documents terms in provided text

**URL:** https://discuss.elastic.co/t/search-documents-terms-in-provided-text/91917
**Category:** Elasticsearch
**Created:** [July 5, 2017, 1:57pm UTC](https://discuss.elastic.co/t/search-documents-terms-in-provided-text/91917 "2017-07-05T13:57:14Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![romantolkachyov](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/romantolkachyov/32/19788_2.png) [@romantolkachyov](https://discuss.elastic.co/u/romantolkachyov)
#### Post date: [July 5, 2017, 1:57pm UTC](https://discuss.elastic.co/t/search-documents-terms-in-provided-text/91917/1 "2017-07-05T13:57:14Z")

</div>

Hi! I need to match a lot of tags (40k) contained as a separate documents in ES in provided query text (500 words). I need a list of matched documents and match positions in original text (if possible) as a result. This is a classification task the most. How can I achive this in ES? Is it possible? Only way I found is terms query but I didn't know if it is good to pass 500 terms to it (and I need to tokenize text somewhow before I pass it to ES).

---

<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: [August 2, 2017, 1:57pm UTC](https://discuss.elastic.co/t/search-documents-terms-in-provided-text/91917/2 "2017-08-02T13:57:33Z")

</div>

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