# Any alternative to payload

**URL:** <https://discuss.elastic.co/t/any-alternative-to-payload/2080>\
**Category:** Elasticsearch\
**Created:** [June 7, 2015, 7:04am UTC](https://discuss.elastic.co/t/any-alternative-to-payload/2080 "2015-06-07T07:04:35Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![mosiddi](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mosiddi/32/577_2.png) [@mosiddi](https://discuss.elastic.co/u/mosiddi)\
**Post date:** [June 7, 2015, 7:04am UTC](https://discuss.elastic.co/t/any-alternative-to-payload/2080/1 "2015-06-07T07:04:35Z")

</div>

I've a scenario where I want to index contents in Elasticsearch with more information for each word appearing in the context. For example, if the content is -

> Hi there, how are you. I miss you.

We want to index each word in above sentence as well context around the word. Example, 'miss' is a feeling, 'you' is a person, etc. We use payloads today to store the context as well as the position.

But processing payloads is not that faster and query performance is not great when the #of documents is huge. Any alternative we could try?

---

<div class="post-metadata">

**Author:** ![mosiddi](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mosiddi/32/577_2.png) [@mosiddi](https://discuss.elastic.co/u/mosiddi)\
**Post date:** [June 7, 2015, 7:06am UTC](https://discuss.elastic.co/t/any-alternative-to-payload/2080/2 "2015-06-07T07:06:53Z")

</div>

Also, the context is fixed, we have a set of things we care about (feeling, person, situation, etc.) and we use number mapping (0- feeling, 1 - person, etc.) when adding detail in ES payload.

---

<div class="post-metadata">

**Author:** ![Jason\_Wee](https://avatars.discourse-cdn.com/v4/letter/j/7ea924/32.png) [@Jason\_Wee](https://discuss.elastic.co/u/Jason_Wee)\
**Post date:** [June 7, 2015, 10:26am UTC](https://discuss.elastic.co/t/any-alternative-to-payload/2080/3 "2015-06-07T10:26:18Z")

</div>

a wild shot, will shingle work for you? [https://www.elastic.co/guide/en/elasticsearch/guide/master/shingles.html](https://www.elastic.co/guide/en/elasticsearch/guide/master/shingles.html)

---

<div class="post-metadata">

**Author:** ![mosiddi](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mosiddi/32/577_2.png) [@mosiddi](https://discuss.elastic.co/u/mosiddi)\
**Post date:** [June 7, 2015, 10:59am UTC](https://discuss.elastic.co/t/any-alternative-to-payload/2080/4 "2015-06-07T10:59:55Z")

</div>

Thanks @Jason_Wee. This might work in cases where the query from customer is like -

> sky nature

where 'sky' is the word which appeared in content and 'nature' is something which sky represents. Bu the query from the customer will be like

> nature OR environment

and we give back all results where we had words which meant above. In addition we also want to give aggregation of how many times we found nature/environment context. In highlight of result, we want to highlight the word which represented the searched context.

---

<div class="post-metadata">

**Author:** ![mosiddi](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mosiddi/32/577_2.png) [@mosiddi](https://discuss.elastic.co/u/mosiddi)\
**Post date:** [June 9, 2015, 12:23pm UTC](https://discuss.elastic.co/t/any-alternative-to-payload/2080/5 "2015-06-09T12:23:05Z")

</div>

@all - any thoughts on this guys?

---

<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, 12:08am UTC](https://discuss.elastic.co/t/any-alternative-to-payload/2080/6 "2017-07-06T00:08:49Z")

</div>


