# What is the implication of making a large text field as keyword (using multi-fields)?

**URL:** <https://discuss.elastic.co/t/what-is-the-implication-of-making-a-large-text-field-as-keyword-using-multi-fields/324224>\
**Category:** Elasticsearch\
**Created:** [January 30, 2023, 11:49am UTC](https://discuss.elastic.co/t/what-is-the-implication-of-making-a-large-text-field-as-keyword-using-multi-fields/324224 "2023-01-30T11:49:19Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![DarwinGoyal](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/darwingoyal/32/113485_2.png) [@DarwinGoyal](https://discuss.elastic.co/u/DarwinGoyal)\
**Post date:** [January 30, 2023, 11:49am UTC](https://discuss.elastic.co/t/what-is-the-implication-of-making-a-large-text-field-as-keyword-using-multi-fields/324224/1 "2023-01-30T11:49:19Z")

</div>

What are the considerations that I should take into account while making a field as keyword?  
To provide some search capabilities I need to make a text field as keyword. I am not sure if there are any performance implications of making a large text field as keyword. Can someone please tell how should I make a decision?  
Thanks.

---

<div class="post-metadata">

**Author:** ![Venkata\_Raja](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/venkata_raja/32/114264_2.png) [@Venkata\_Raja](https://discuss.elastic.co/u/Venkata_Raja)\
**Post date:** [January 31, 2023, 6:18am UTC](https://discuss.elastic.co/t/what-is-the-implication-of-making-a-large-text-field-as-keyword-using-multi-fields/324224/2 "2023-01-31T06:18:30Z")

</div>

Hi Darwin,

I don't think there will be any implications because keyword fields will be indexed as it is and doesn't need any tokenization , analyzing . Go ahead if you want exact search on that field.

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [January 31, 2023, 6:47am UTC](https://discuss.elastic.co/t/what-is-the-implication-of-making-a-large-text-field-as-keyword-using-multi-fields/324224/3 "2023-01-31T06:47:16Z")

</div>

What search capabilities require that you index the field as keyword?

How large can the field be?

---

<div class="post-metadata">

**Author:** ![Ayush\_Mathur](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ayush_mathur/32/77134_2.png) [@Ayush\_Mathur](https://discuss.elastic.co/u/Ayush_Mathur)\
**Post date:** [January 31, 2023, 7:45am UTC](https://discuss.elastic.co/t/what-is-the-implication-of-making-a-large-text-field-as-keyword-using-multi-fields/324224/4 "2023-01-31T07:45:57Z")

</div>

@DarwinGoyal if your text field data is large (say \>10M) which is generally the case for service payloads, I would suggest to define payload as vector with offset enabled instead of using keywords. When `keyword` is used for searches, you need to provide **full exact** text that you want to match, else your search will return 0 results.  
Vector is a better approach for storing large texts as the underlying dictionary is efficient to compute it, refer: [term\_vector | Elasticsearch Guide [8.6] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/current/term-vector.html)

---

<div class="post-metadata">

**Author:** ![Mark\_Harwood1](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mark_harwood1/32/101255_2.png) [@Mark\_Harwood1](https://discuss.elastic.co/u/Mark_Harwood1)\
**Post date:** [January 31, 2023, 8:07am UTC](https://discuss.elastic.co/t/what-is-the-implication-of-making-a-large-text-field-as-keyword-using-multi-fields/324224/5 "2023-01-31T08:07:55Z")

</div>

[This blog](https://www.elastic.co/blog/find-strings-within-strings-faster-with-the-new-elasticsearch-wildcard-field) outlines a lot of the pros and cons of approaches to indexing and searching large strings

---

<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:** [February 28, 2023, 8:08am UTC](https://discuss.elastic.co/t/what-is-the-implication-of-making-a-large-text-field-as-keyword-using-multi-fields/324224/6 "2023-02-28T08:08:17Z")

</div>

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