# Can i do a full-text search where each word has location metadata?

**URL:** <https://discuss.elastic.co/t/can-i-do-a-full-text-search-where-each-word-has-location-metadata/119405>\
**Category:** Elasticsearch\
**Created:** [February 12, 2018, 12:04am UTC](https://discuss.elastic.co/t/can-i-do-a-full-text-search-where-each-word-has-location-metadata/119405 "2018-02-12T00:04:52Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![sinofis](https://avatars.discourse-cdn.com/v4/letter/s/8edcca/32.png) [@sinofis](https://discuss.elastic.co/u/sinofis)\
**Post date:** [February 12, 2018, 12:04am UTC](https://discuss.elastic.co/t/can-i-do-a-full-text-search-where-each-word-has-location-metadata/119405/1 "2018-02-12T00:04:52Z")

</div>

I'm trying to build a text search from voice to text, each word should have a metadata position something like start: 54s; end: 57s.

Metadata shouldn't be indexed but only returned with results. Is that possible? I'd appreciate some advice on how to do it.

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [February 12, 2018, 12:17am UTC](https://discuss.elastic.co/t/can-i-do-a-full-text-search-where-each-word-has-location-metadata/119405/2 "2018-02-12T00:17:56Z")

</div>

You'd need to figure this out before sending to Elasticsearch, there's nothing native that could calculate this.

---

<div class="post-metadata">

**Author:** ![sinofis](https://avatars.discourse-cdn.com/v4/letter/s/8edcca/32.png) [@sinofis](https://discuss.elastic.co/u/sinofis)\
**Post date:** [February 12, 2018, 12:41am UTC](https://discuss.elastic.co/t/can-i-do-a-full-text-search-where-each-word-has-location-metadata/119405/3 "2018-02-12T00:41:31Z")

</div>

Thank you for the replay, currently I can get text and position from audio.

My current idea is to make a regular text search then use a custom highlighter to get the text position. With the position query an SQL database for a location in audio.

I'm wondering if I could do the whole thing natively with Elastic

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [February 12, 2018, 3:20am UTC](https://discuss.elastic.co/t/can-i-do-a-full-text-search-where-each-word-has-location-metadata/119405/4 "2018-02-12T03:20:32Z")

</div>

Elasticsearch cannot do the sort of merge/join with the words and the timings, you may need to do that in your client.

But you could put both sets of data into Elasticsearch then you've got a quick data store to leverage at least 🙂

---

<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:** [March 12, 2018, 3:21am UTC](https://discuss.elastic.co/t/can-i-do-a-full-text-search-where-each-word-has-location-metadata/119405/5 "2018-03-12T03:21:40Z")

</div>

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