Uploaded image for project: 'Solr'
  1. Solr
  2. SOLR-2202

Money/Currency FieldType

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.5
    • 3.6, 4.0-ALPHA
    • Schema and Analysis
    • 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

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

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved: