Just wanted to "+1" this discussion as I am currently working through the
The gist of it is that we are building a property listing site whose
primary market is in a country that deals with several currencies. People
submit their listing prices in one of 3 different currencies.
I understand your suggestion of choosing one currency for storage, but that
simply isnt an option for us. The exchange rates between all the currencies
are constantly changing, and we can't have a user enter an amount in one
currency and then store/display it in a slightly different amount. We must
store the values along with the currency they belong to. Of course this is
not a problem with Times and Dates because the conversion to/from UTC never
With this in mind, do you have any other ideas for solving this one?
the approach I'm trying now involves creating a filtered query with both
AND and OR blocks, but I haven't figured out how to get the results I want
On Wednesday, August 29, 2012 6:52:01 PM UTC-3, kimchy wrote:
Do you mean indexing multiple amounts per document, each in a different
currency? If so, one additional simple option is to simply have
"field_usd", or "field_euro".
If you want dynamic conversion of currencies, then you can do it on your
end, and settle on a single currency you use for all money fields. Similar
to what we do with dates where we convert all to UTC.
I am currently looking into the possibilities of mapping monetary types
in elasticsearch. Unfortunately I couldnt find a designated module for it
similar to http://wiki.apache.org/solr/CurrencyField.
What is the standard approach in elasticsearch for mapping money ? As
far as I understand a money type could be mapped as a nested document, but
wouldn't create that additional overhead by storing each money item as a
separate document ? Does it make sense to implement an own money type with
an own mapping as elasticsearch plugin ? Are there any example of how to
implement own types in elasticsearch using FieldData/DocFieldData/Mapper ?