# Precision\_step - number or string?

**URL:** <https://discuss.elastic.co/t/precision-step-number-or-string/12221>\
**Category:** Elasticsearch\
**Created:** [June 2, 2013, 6:26am UTC](https://discuss.elastic.co/t/precision-step-number-or-string/12221 "2013-06-02T06:26:56Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Andrew\_Gaydenko](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/andrew_gaydenko/32/914_2.png) [@Andrew\_Gaydenko](https://discuss.elastic.co/u/Andrew_Gaydenko)\
**Post date:** [June 2, 2013, 6:26am UTC](https://discuss.elastic.co/t/precision-step-number-or-string/12221/1 "2013-06-02T06:26:56Z")

</div>

In the official documentation precision\_step is called as "number", but in  
examples value is wrapped into double-qoutes: "precision\_step" : "0" So, in  
json terms, is it a string or a number? Is there more precision definition  
of precision\_step?

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![Ivan](https://avatars.discourse-cdn.com/v4/letter/i/df788c/32.png) [@Ivan](https://discuss.elastic.co/u/Ivan)\
**Post date:** [June 3, 2013, 7:29pm UTC](https://discuss.elastic.co/t/precision-step-number-or-string/12221/2 "2013-06-03T19:29:39Z")

</div>

The value can be either a string or number since the code knows how to  
interpret both:  
[https://github.com/elasticsearch/elasticsearch/blob/master/src/main/java/org/elasticsearch/index/mapper/core/TypeParsers.java#L54](https://github.com/elasticsearch/elasticsearch/blob/master/src/main/java/org/elasticsearch/index/mapper/core/TypeParsers.java#L54)

The precision step is a Lucene-level concept and you can read more about it  
on the Lucene site:  
[http://lucene.apache.org/core/4\_3\_0/core/org/apache/lucene/search/NumericRangeQuery.html#precisionStepDesc](http://lucene.apache.org/core/4_3_0/core/org/apache/lucene/search/NumericRangeQuery.html#precisionStepDesc)

On Sat, Jun 1, 2013 at 11:26 PM, Andrew Gaydenko  
[andrew.gaydenko@gmail.com](mailto:andrew.gaydenko@gmail.com)wrote:

> In the official documentation precision\_step is called as "number", but  
> in examples value is wrapped into double-qoutes: "precision\_step" : "0"So, in json terms, is it a string or a number? Is there more precision  
> definition of precision\_step?
> 
> --  
> You received this message because you are subscribed to the Google Groups  
> "elasticsearch" group.  
> To unsubscribe from this group and stop receiving emails from it, send an  
> email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![Andrew\_Gaydenko](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/andrew_gaydenko/32/914_2.png) [@Andrew\_Gaydenko](https://discuss.elastic.co/u/Andrew_Gaydenko)\
**Post date:** [June 3, 2013, 8:39pm UTC](https://discuss.elastic.co/t/precision-step-number-or-string/12221/3 "2013-06-03T20:39:33Z")

</div>

Ivan, thanks for the clarification and refs!

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<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, 2:33am UTC](https://discuss.elastic.co/t/precision-step-number-or-string/12221/4 "2017-07-06T02:33:13Z")

</div>


