ES uses Jackson, and Jackson uses Java Double.toString(), which has
peculiarities for numbers < 10^-3 or >= 10^7 since it converts them to
scientific notation.

There are two options:

- patching ES for optional format options of doubles, e.g.

NumberFormat nf = NumberFormat.getInstance();
nf.setGroupingUsed(false);
str = nf.format(d)

- or switch to BigInteger/BigDecimal by waiting for full
BigInteger/BigDecimal support in Lucene and Elasticsearch

https://issues.apache.org/jira/browse/LUCENE-5596

I sent in a format-only patch but it was extended to support also numeric
range queries and aggregations which is a very difficult task.

Jörg


On Sat, Sep 13, 2014 at 11:31 PM, Nick <nick.dhu...@gmail.com> wrote:

> Is there a way to suppress elasticsearch from sending a bit number field
> in scientific notation? For example, a field stored in ES, goal_revenue:
> 10000000, gets returned as goal_revenue:1e+07 with the search api.
>
>
>
>  --
> 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+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/elasticsearch/2f947b82-a160-425d-b355-898efac72be6%40googlegroups.com
> <https://groups.google.com/d/msgid/elasticsearch/2f947b82-a160-425d-b355-898efac72be6%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elasticsearch/CAKdsXoHOW0sG7i9tQeDMWvdpLw0p7cvZNO2O23BBWDW3aGVcxg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to