lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jan Høydahl (Updated) (JIRA) <>
Subject [jira] [Updated] (SOLR-3255) OpenExchangeRates.Org Exchange Rate Provider
Date Thu, 22 Mar 2012 12:04:22 GMT


Jan Høydahl updated SOLR-3255:

    Attachment: SOLR-3255.patch

Here's the provider implementation with tests. See
for documentation. Highlights:

* Uses open, free exchange rates REST API
* Plugs into CurrencyField in schema.xml
* Can load rates json from any URL or through ResourceLoader
* Configurable refresh of rates, enforces max every 60 min (since that's the update rate of
the API)

This patch also changes the ExchangeRateProvider interface slightly:
* Instead of listCurrencies() returning FROM,TO pairs (which would be 25.000 lines for all
available pairs for this provider, it takes an argument, so that listCurrencies(false) returns
a list of supported currencies, while listCurrencies(true) returns list of pairs

Known limitations/questions:
* The reflection for the providerClass param uses Class.forName() to instantiate the provider.
But then the solr.MyClass alias does not work. How to solve this?
* Is the correct location o.a.s.schema for these providers or should we make a new package
somewhere else?
> OpenExchangeRates.Org Exchange Rate Provider
> --------------------------------------------
>                 Key: SOLR-3255
>                 URL:
>             Project: Solr
>          Issue Type: New Feature
>          Components: Schema and Analysis
>    Affects Versions: 3.6, 4.0
>            Reporter: Jan Høydahl
>            Assignee: Jan Høydahl
>              Labels: CurrencyField
>             Fix For: 3.6, 4.0
>         Attachments: SOLR-3255.patch
> An exchange rate provider for CurrencyField using the freely available feed from

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:!default.jspa
For more information on JIRA, see:


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message