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 '
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
kimchy
(Shay Banon)
July 4, 2011, 6:45am
2
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 '
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
: 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!