You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Hoss Man (JIRA)" <ji...@apache.org> on 2013/03/05 03:57:12 UTC

[jira] [Updated] (SOLR-3239) DocTransformer for formatting CurrencyField as a virtual field

     [ https://issues.apache.org/jira/browse/SOLR-3239?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Hoss Man updated SOLR-3239:
---------------------------

    Summary: DocTransformer for formatting CurrencyField as a virtual field  (was: Function for returning a CurrencyField as a virtual field)

FYI: SOLR-4138 added a currency(...) function like the one i proposed.  the only thing left is a DocTransformer for arbitrary currency formatting.
                
> DocTransformer for formatting CurrencyField as a virtual field
> --------------------------------------------------------------
>
>                 Key: SOLR-3239
>                 URL: https://issues.apache.org/jira/browse/SOLR-3239
>             Project: Solr
>          Issue Type: New Feature
>            Reporter: Jan Høydahl
>             Fix For: 4.2, 5.0
>
>
> With the new CurrencyField from SOLR-2202, we can now do range queries, sort and soon faceting on CurrencyField.
> One thing we cannot do is return a converted value. We can only return the stored value which must be in the same currency as it was entered, e.g. "10.0,USD". People now have to do this conversion in application layer, reading the same currency.xml file as in Solr. This is a mess to keep in sync, and is hard to support with other ExchangeRateProviders or in other client languages than Java.
> This patch should implement a Function which takes a field name and requested currency as input and returns the converted value. Optionally it could also take care of localized display, e.g. "$10.0" instead of "10.0,USD". Proposed syntax:
> {code}
> &fl=title,price:currency(price_c,EUR)         # Returns price_c in EUR as "price"
> &fl=title,price:currency(price_c,EUR,en_US)   # Returns price_c in EUR, formatted according to en_US locale
> {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
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