You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Jan Høydahl (Updated JIRA)" <ji...@apache.org> on 2012/03/22 13:04:22 UTC
[jira] [Updated] (SOLR-3255) OpenExchangeRates.Org Exchange Rate
Provider
[ https://issues.apache.org/jira/browse/SOLR-3255?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jan Høydahl updated SOLR-3255:
------------------------------
Attachment: SOLR-3255.patch
Here's the provider implementation with tests. See http://wiki.apache.org/solr/CurrencyField 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: https://issues.apache.org/jira/browse/SOLR-3255
> 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 http://openexchangerates.org/
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org