# Words vs Guids, what is faster?

**URL:** <https://discuss.elastic.co/t/words-vs-guids-what-is-faster/273819>\
**Category:** Elasticsearch\
**Created:** [May 24, 2021, 12:18pm UTC](https://discuss.elastic.co/t/words-vs-guids-what-is-faster/273819 "2021-05-24T12:18:27Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Baygon](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/baygon/32/91792_2.png) [@Baygon](https://discuss.elastic.co/u/Baygon)\
**Post date:** [May 24, 2021, 12:18pm UTC](https://discuss.elastic.co/t/words-vs-guids-what-is-faster/273819/1 "2021-05-24T12:18:27Z")

</div>

I'm in front of a design choice where I would need a bit of help to choose the most efficient way.

I'm currently indexing data tagged with a string of comma separated Guids, for example:  
`\"e659959d-392f-44c5-83a5-fb959cdbaccc\",\"ab2975e3-b9ca-4b1a-a93e-fb61a5d5c3a4\",\"c48e0bf4-7a1b-4ffd-893c-12e46e664f7f\",\"0074af4d-eb56-4e57-89b6-07c39c63c9c4\"`

This is the exact look of the string which is in one field only (ingestion in logstash sql of a serialized list stored in the mysql db).

I can modify the logstash query to translate the Guids to english words, for example:  
`english, cute, irl`

Which one of the above solution would yield the best search performance when executing the following:  
`GET myindex/_search { "query": { "bool":{ "must":[{"bool":{"should": [{"match":{"tag_ids":{"query":"ab2975e3-b9ca-4b1a-a93e-fb61a5d5c3a4","operator":"AND"}}}]}} ] } } }`

or of course

`GET myindex/_search { "query": { "bool":{ "must":[{"bool":{"should": [{"match":{"tag_ids":{"query":"english","operator":"AND"}}}]}} ] } } }`

Complexity of ingestion is minor while search performance is critical. Thanks for your inputs

---

<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:** [May 24, 2021, 11:56pm UTC](https://discuss.elastic.co/t/words-vs-guids-what-is-faster/273819/2 "2021-05-24T23:56:35Z")

</div>

The best approach here is to test each and see what gets you the results you want.

---

<div class="post-metadata">

**Author:** ![Baygon](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/baygon/32/91792_2.png) [@Baygon](https://discuss.elastic.co/u/Baygon)\
**Post date:** [May 25, 2021, 1:53am UTC](https://discuss.elastic.co/t/words-vs-guids-what-is-faster/273819/3 "2021-05-25T01:53:48Z")

</div>

not really, it would take about 2 weeks to ingest the data, ie 4 weeks to reach a conclusion, so if someone knows the logic behind the fuzzy search and how words/guids are indexed and how it affects performance that would be valuable, not only to me, but to anyone trying to design a performant ES index

---

<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:** [June 22, 2021, 1:54am UTC](https://discuss.elastic.co/t/words-vs-guids-what-is-faster/273819/4 "2021-06-22T01:54:09Z")

</div>

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