• Type: New Feature
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.5
    • Fix Version/s: 3.6, 4.0-ALPHA
    • Component/s: Schema and Analysis
    • Labels:


      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:


        1. SOLR-2202-3x-stabilize-provider-interface.patch
          8 kB
          Jan Høydahl
        2. SOLR-2202-no-fieldtype-deps.patch
          5 kB
          Jan Høydahl
        3. SOLR-2202-fix-NPE-if-no-tlong-fieldType.patch
          2 kB
          Koji Sekiguchi
        4. SOLR-2202.patch
          58 kB
          Jan Høydahl
        5. SOLR-2202.patch
          56 kB
          Jan Høydahl
        6. SOLR-2202.patch
          52 kB
          Jan Høydahl
        7. SOLR-2202.patch
          43 kB
          Jan Høydahl
        8. SOLR-2202-solr-10.patch
          41 kB
          Andrew Morrison
        9. SOLR-2202.patch
          41 kB
          Greg Fodor
        10. SOLR-2202.patch
          41 kB
          Jan Høydahl
        11. SOLR-2202.patch
          41 kB
          Jan Høydahl
        12. SOLR-2202.patch
          33 kB
          Greg Fodor
        13. SOLR-2202-solr-9.patch
          33 kB
          Greg Fodor
        14. SOLR-2202-solr-8.patch
          40 kB
          Greg Fodor
        15. SOLR-2202-solr-7.patch
          40 kB
          Greg Fodor
        16. SOLR-2202-solr-6.patch
          37 kB
          Greg Fodor
        17. SOLR-2202-solr-5.patch
          30 kB
          Greg Fodor
        18. SOLR-2202-solr-4.patch
          30 kB
          Greg Fodor
        19. SOLR-2022-solr-3.patch
          29 kB
          Greg Fodor
        20. SOLR-2202-solr-2.patch
          18 kB
          Greg Fodor
        21. SOLR-2202-lucene-1.patch
          24 kB
          Greg Fodor
        22. SOLR-2202-solr-1.patch
          17 kB
          Greg Fodor

          Issue Links



              • Assignee:
                janhoy Jan Høydahl
                gfodor Greg Fodor
              • Votes:
                3 Vote for this issue
                4 Start watching this issue


                • Created: