# Setting precision\_step to zero

**URL:** <https://discuss.elastic.co/t/setting-precision-step-to-zero/4735>\
**Category:** Elasticsearch\
**Created:** [June 29, 2011, 9:53pm UTC](https://discuss.elastic.co/t/setting-precision-step-to-zero/4735 "2011-06-29T21:53:54Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ahmet\_Arslan](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ahmet_arslan/32/3152_2.png) [@Ahmet\_Arslan](https://discuss.elastic.co/u/Ahmet_Arslan)\
**Post date:** [June 29, 2011, 9:53pm UTC](https://discuss.elastic.co/t/setting-precision-step-to-zero/4735/1 "2011-06-29T21:53:54Z")

</div>

Hello ElasticSearch users,

Using version 0.16.2, I set precision\_step to zero for an integer type to simulate plain integer. (not for range queries, but for field faceting)

{"type" : "integer", "store" : "no", "precision\_step" : "0"}

However when I retrieve the mapping via  
curl -XGET '[http://localhost:9200/myindex/mytype/\_mapping?pretty=true](http://localhost:9200/myindex/mytype/_mapping?pretty=true)'

it displays precision\_step as 2147483647. Ditto for float type.

"my\_plain\_integer" : {  
"precision\_step" : 2147483647,  
"type" : "integer"  
},

Is this something cosmetic? Or setting it to zero isn't taking effect?

Thanks,  
Ahmet

---

<div class="post-metadata">

**Author:** ![kimchy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kimchy/32/44952_2.png) [@kimchy](https://discuss.elastic.co/u/kimchy)\
**Post date:** [July 4, 2011, 6:45am UTC](https://discuss.elastic.co/t/setting-precision-step-to-zero/4735/2 "2011-07-04T06:45:12Z")

</div>

This is correct, 0 is translated to Integer.MAX\_VALUE which produces one term per numeric field.

On Thursday, June 30, 2011 at 12:53 AM, Ahmet Arslan wrote:

> Hello Elasticsearch users,
> 
> Using version 0.16.2, I set precision\_step to zero for an integer type to simulate plain integer. (not for range queries, but for field faceting)
> 
> {"type" : "integer", "store" : "no", "precision\_step" : "0"}
> 
> However when I retrieve the mapping via  
> curl -XGET '[http://localhost:9200/myindex/mytype/\_mapping?pretty=true](http://localhost:9200/myindex/mytype/_mapping?pretty=true)'
> 
> it displays precision\_step as 2147483647. Ditto for float type.
> 
> "my\_plain\_integer" : {  
> "precision\_step" : 2147483647,  
> "type" : "integer"  
> },
> 
> Is this something cosmetic? Or setting it to zero isn't taking effect?
> 
> Thanks,  
> Ahmet

---

<div class="post-metadata">

**Author:** ![Ahmet\_Arslan](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ahmet_arslan/32/3152_2.png) [@Ahmet\_Arslan](https://discuss.elastic.co/u/Ahmet_Arslan)\
**Post date:** [July 4, 2011, 7:52am UTC](https://discuss.elastic.co/t/setting-precision-step-to-zero/4735/3 "2011-07-04T07:52:35Z")

</div>

: This is correct, 0 is translated to Integer.MAX\_VALUE which produces  
: one term per numeric field.

It is good to know that, thanks Shay!

---

<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, 4:01am UTC](https://discuss.elastic.co/t/setting-precision-step-to-zero/4735/4 "2017-07-06T04:01:54Z")

</div>


