# Finding exact position of searched text in the document

**URL:** <https://discuss.elastic.co/t/finding-exact-position-of-searched-text-in-the-document/89497>\
**Category:** Elasticsearch\
**Created:** [June 15, 2017, 5:05am UTC](https://discuss.elastic.co/t/finding-exact-position-of-searched-text-in-the-document/89497 "2017-06-15T05:05:41Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![jshraddha](https://avatars.discourse-cdn.com/v4/letter/j/e480ec/32.png) [@jshraddha](https://discuss.elastic.co/u/jshraddha)\
**Post date:** [June 15, 2017, 5:05am UTC](https://discuss.elastic.co/t/finding-exact-position-of-searched-text-in-the-document/89497/1 "2017-06-15T05:05:41Z")

</div>

Hi,

How can we find the exact position of a searched word in the document source?  
If I am searching document with highlight query, I am getting all the occurrences of searched word now I have to find where exactly these words appear in the actual document source.  
Is there any way to do this in elasticsearch?

---

<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 13, 2017, 5:05am UTC](https://discuss.elastic.co/t/finding-exact-position-of-searched-text-in-the-document/89497/2 "2017-07-13T05:05:49Z")

</div>

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