I've created an elasticsearch index and my current mapping stores the dollar amount of an item as a string. This is proving to be difficult as I can't search/filter on this value correctly.
This occurs because ElasticSearch has no built-in type for decimals or currency, so your value is likely being converted to a
float and suffering from floating point precision issues.
You should be able to get around this by simply storing the value as a
long (e.g. the number of cents rather than dollars) and converting to and from your
Since you'll only ever do this conversion for values you are already enumerating, the performance impact should be negligible.