# Limitation for Max number of values for a given field

**URL:** <https://discuss.elastic.co/t/limitation-for-max-number-of-values-for-a-given-field/227882>\
**Category:** Elasticsearch\
**Created:** [April 14, 2020, 10:04am UTC](https://discuss.elastic.co/t/limitation-for-max-number-of-values-for-a-given-field/227882 "2020-04-14T10:04:56Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![overmike](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/overmike/32/66266_2.png) [@overmike](https://discuss.elastic.co/u/overmike)\
**Post date:** [April 14, 2020, 10:04am UTC](https://discuss.elastic.co/t/limitation-for-max-number-of-values-for-a-given-field/227882/1 "2020-04-14T10:04:56Z")

</div>

Is there any limitation for max number of values for a given field?

I am having a use case for a document with 800k distinct values for a given field. each value will be in 10-20 characters and in keyword type. Before I try this in my local cluster, I would like to undersrand if there is any limitation and also best practise for such a case?

Currently, I think this should be still within the max\_content\_length which is 100MB. and other limit seems does not apply, like max number of nested object and max number of fields.

---

<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:** [April 14, 2020, 11:12am UTC](https://discuss.elastic.co/t/limitation-for-max-number-of-values-for-a-given-field/227882/2 "2020-04-14T11:12:20Z")

</div>

This sounds unusual. What is the use case? How many such documents are you planning to index? How are you going to query them?

---

<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:** [May 12, 2020, 11:12am UTC](https://discuss.elastic.co/t/limitation-for-max-number-of-values-for-a-given-field/227882/3 "2020-05-12T11:12:26Z")

</div>

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