Return-Path: X-Original-To: apmail-lucene-dev-archive@www.apache.org Delivered-To: apmail-lucene-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 663B69E83 for ; Sun, 11 Mar 2012 12:24:24 +0000 (UTC) Received: (qmail 91620 invoked by uid 500); 11 Mar 2012 12:24:22 -0000 Delivered-To: apmail-lucene-dev-archive@lucene.apache.org Received: (qmail 91554 invoked by uid 500); 11 Mar 2012 12:24:22 -0000 Mailing-List: contact dev-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@lucene.apache.org Delivered-To: mailing list dev@lucene.apache.org Received: (qmail 91543 invoked by uid 99); 11 Mar 2012 12:24:22 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 11 Mar 2012 12:24:22 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,T_RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 11 Mar 2012 12:24:20 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id 0B73218D45 for ; Sun, 11 Mar 2012 12:23:59 +0000 (UTC) Date: Sun, 11 Mar 2012 12:23:59 +0000 (UTC) From: "Koji Sekiguchi (Issue Comment Edited) (JIRA)" To: dev@lucene.apache.org Message-ID: <1757587104.48976.1331468639061.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <23832797.90051288133479065.JavaMail.jira@thor> Subject: [jira] [Issue Comment Edited] (SOLR-2202) Money/Currency FieldType MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/SOLR-2202?page=3Dcom.atlassian.= jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D13227= 037#comment-13227037 ]=20 Koji Sekiguchi edited comment on SOLR-2202 at 3/11/12 12:22 PM: ---------------------------------------------------------------- My patch introduces another NPE problem (try to go to schema browser, for e= xample) because "tlong" field which is created in init() method lacks some = required properties (e.g. typeName). I don't like the idea of hard coding to construct tlong object, how about i= ntroducing an attribute something like "subFieldType", that the way of curr= ently AbstractSubTypeFieldType does? "subFieldType" is set to tlong as default is ok I think this time, as we ca= n throw SolrException if the sub type doesn't exist, like AbstractSubTypeFi= eldType does. =20 was (Author: koji): My patch introduces another NPE problem (try to go to schema browser, f= or example) because "tlong" field which is created in init() method lacks s= ome required properties (e.g. typeName). I don't like the idea of hard coding to construct tlong object, how about i= ntroducing an attribute something like "subFieldType", that the way of curr= ently AbstractSubTypeFieldType does? =20 > Money/Currency FieldType > ------------------------ > > Key: SOLR-2202 > URL: https://issues.apache.org/jira/browse/SOLR-2202 > Project: Solr > Issue Type: New Feature > Components: Schema and Analysis > Affects Versions: 1.5 > Reporter: Greg Fodor > Assignee: Jan H=C3=B8ydahl > Fix For: 3.6, 4.0 > > Attachments: SOLR-2022-solr-3.patch, SOLR-2202-fix-NPE-if-no-tlon= g-fieldType.patch, SOLR-2202-lucene-1.patch, SOLR-2202-solr-1.patch, SOLR-2= 202-solr-10.patch, SOLR-2202-solr-2.patch, SOLR-2202-solr-4.patch, SOLR-220= 2-solr-5.patch, SOLR-2202-solr-6.patch, SOLR-2202-solr-7.patch, SOLR-2202-s= olr-8.patch, SOLR-2202-solr-9.patch, SOLR-2202.patch, SOLR-2202.patch, SOLR= -2202.patch, SOLR-2202.patch, SOLR-2202.patch, SOLR-2202.patch, SOLR-2202.p= atch, SOLR-2202.patch > > > Provides support for monetary values to Solr/Lucene with query-time curre= ncy 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 u= seful if there are fees associated with exchanging the currency.) > At indexing time, money fields can be indexed in a native currency. For e= xample, 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 cur= rency.xml file, the sorting and querying against Solr can take into account= fluctuations in currency exchange rates without having to re-index the doc= uments. > The new "money" field type is a polyfield which indexes two fields, one w= hich contains the amount of the value and another which contains the curren= cy code or symbol. The currency metadata (names, symbols, codes, and exchan= ge rates) are expected to be in an xml file which is pointed to by the fiel= d type declaration in the schema.xml. > The current patch is factored such that Money utility functions and confi= guration metadata lie in Lucene (see MoneyUtil and CurrencyConfig), while t= he 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 capabil= ities of the search engine at Etsy. > Also see WIKI page: http://wiki.apache.org/solr/MoneyFieldType -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrato= rs: https://issues.apache.org/jira/secure/ContactAdministrators!default.jsp= a 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