I am in the midst of tuning my ElasticSearch cluster. One major issue is
memory and some of the main culprits are facets over float values. To be
more precise, lots of distinct range facets over fields that contain prices
(11.99, 2139.00, 0.01, etc.). These ranges are combined on the client side
and mimic dynamic ranges.
Both ints and floats are 4 bytes. One common practice is to never use
floating points for currency due to rounding errors, but there are no
arithmetic operations performed on these values. Plus, I don't want to
convert legacy code. Is there any performance to be had from switching
values from floats to ints and performing divide by 100.0 on the client
side? I guess this question mainly pertains to Lucene since it deals with
the internal caches. The results can also be sorted on these values.
Cheers,
Ivan
--