# How we know what is the lenght limit for fields type values

**URL:** <https://discuss.elastic.co/t/how-we-know-what-is-the-lenght-limit-for-fields-type-values/9189>\
**Category:** Elasticsearch\
**Created:** [September 28, 2012, 12:11pm UTC](https://discuss.elastic.co/t/how-we-know-what-is-the-lenght-limit-for-fields-type-values/9189 "2012-09-28T12:11:41Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rashid\_2](https://avatars.discourse-cdn.com/v4/letter/r/e19b73/32.png) [@Rashid\_2](https://discuss.elastic.co/u/Rashid_2)\
**Post date:** [September 28, 2012, 12:11pm UTC](https://discuss.elastic.co/t/how-we-know-what-is-the-lenght-limit-for-fields-type-values/9189/1 "2012-09-28T12:11:41Z")

</div>

how can i know what is acceptable length for field type who i declare in my  
mapping.  
example: field type integer and value is '222222' it is ok.  
but why this is not ok field type integer and value is  
'3333333333333333333333333333333333333333'  
how can we know what length is ok for my declared type  
string,integer,long, etc ?  
have anywhere define the length for all fields?

i am confused about creating my mapping.

--

---

<div class="post-metadata">

**Author:** ![Christian\_Th](https://avatars.discourse-cdn.com/v4/letter/c/f14d63/32.png) [@Christian\_Th](https://discuss.elastic.co/u/Christian_Th)\
**Post date:** [September 28, 2012, 12:56pm UTC](https://discuss.elastic.co/t/how-we-know-what-is-the-lenght-limit-for-fields-type-values/9189/2 "2012-09-28T12:56:23Z")

</div>

Hi,

i think therefore you have to check the ranges of java data types.  
Could be wrong, but i think byte,double,float,int, long, short and String  
are supported. ,

[Java's Primitive Data Types](http://www.cafeaulait.org/course/week2/02.html) could be helpful.

Greetings

Christian Th

Am Freitag, 28. September 2012 14:11:41 UTC+2 schrieb Rashid:

> how can i know what is acceptable length for field type who i declare in  
> my mapping.  
> example: field type integer and value is '222222' it is ok.  
> but why this is not ok field type integer and value is  
> '3333333333333333333333333333333333333333'  
> how can we know what length is ok for my declared type  
> string,integer,long, etc ?  
> have anywhere define the length for all fields?
> 
> i am confused about creating my mapping.

--

---

<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, 3:10am UTC](https://discuss.elastic.co/t/how-we-know-what-is-the-lenght-limit-for-fields-type-values/9189/3 "2017-07-06T03:10:53Z")

</div>

Closed on July 6, 2017, 3:10am UTC


