Details
-
New Feature
-
Status: Closed
-
Major
-
Resolution: Fixed
-
1.5
-
None
Description
Provides support for monetary values to Solr/Lucene with query-time currency conversion. The following features are supported:
- Point queries
- Range quries
- Sorting
- Currency parsing by either currency code or symbol.
- Symmetric & Asymmetric exchange rates. (Asymmetric exchange rates are useful if there are fees associated with exchanging the currency.)
At indexing time, money fields can be indexed in a native currency. For example, if a product on an e-commerce site is listed in Euros, indexing the price field as "1000,EUR" will index it appropriately. By altering the currency.xml file, the sorting and querying against Solr can take into account fluctuations in currency exchange rates without having to re-index the documents.
The new "money" field type is a polyfield which indexes two fields, one which contains the amount of the value and another which contains the currency code or symbol. The currency metadata (names, symbols, codes, and exchange rates) are expected to be in an xml file which is pointed to by the field type declaration in the schema.xml.
The current patch is factored such that Money utility functions and configuration metadata lie in Lucene (see MoneyUtil and CurrencyConfig), while the MoneyType and MoneyValueSource lie in Solr. This was meant to mirror the work being done on the spacial field types.
This patch will be getting used to power the international search capabilities of the search engine at Etsy.
Also see WIKI page: http://wiki.apache.org/solr/MoneyFieldType
Attachments
Attachments
Issue Links
- incorporates
-
SOLR-3228 Backport CurrencyField to 3.x
- Closed
- is depended upon by
-
SOLR-3239 DocTransformer for formatting CurrencyField as a virtual field
- Open
-
SOLR-3218 Range faceting support for CurrencyField
- Closed
- is related to
-
SOLR-3217 refactor range faceting code so that the list of FieldTypes supported isn't hardcoded
- Open
- is required by
-
SOLR-3255 OpenExchangeRates.Org Exchange Rate Provider
- Closed