Return-Path: Delivered-To: apmail-lucene-dev-archive@www.apache.org Received: (qmail 20800 invoked from network); 12 Mar 2011 06:22:00 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 12 Mar 2011 06:22:00 -0000 Received: (qmail 26515 invoked by uid 500); 12 Mar 2011 06:21:59 -0000 Delivered-To: apmail-lucene-dev-archive@lucene.apache.org Received: (qmail 26316 invoked by uid 500); 12 Mar 2011 06:21:59 -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 26309 invoked by uid 99); 12 Mar 2011 06:21:58 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 12 Mar 2011 06:21:58 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of ryantxu@gmail.com designates 209.85.214.176 as permitted sender) Received: from [209.85.214.176] (HELO mail-iw0-f176.google.com) (209.85.214.176) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 12 Mar 2011 06:21:52 +0000 Received: by iwr19 with SMTP id 19so5163262iwr.35 for ; Fri, 11 Mar 2011 22:21:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=qrLRGvlLpw3xu1yC4EcXN/Z3ChZRtYmZyyCjlxm6RwM=; b=Mo8z5xMdO0gr4Ro/UFWas+cSnbF2aa+e6HwayIjn2HSHyXDavYM6AAVE/J8E+JoaXO /mjDdD+CXwDFj4mYsTSIEcBNsusjcfJI19a7HkOtsjhh/+8ePNkyYgP7hLcqoedsHTho nlGhnwxHzFBeqggUXVufdBNMiLVehjmWW5QU4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=RJ3By9X0eIJImqbDDbdr5n//UayqniKfY5Zmim21St4l+eCHMAuvF73kbYK15/7thu k8YFS8/zkIF5tv/M4lEy5z5mZ9ZPrglBfHRBwUZ2Ktk8RscR4rbi7bTTdtPfuq2dyfaW QlPUbbgJA/1UUmRCbSIC/rL0H1y+RBwK4IaWA= MIME-Version: 1.0 Received: by 10.231.184.234 with SMTP id cl42mr7692528ibb.172.1299910890923; Fri, 11 Mar 2011 22:21:30 -0800 (PST) Received: by 10.231.151.132 with HTTP; Fri, 11 Mar 2011 22:21:30 -0800 (PST) In-Reply-To: <024BA787-B0BD-4873-A0A4-67F678DD5081@mitre.org> References: <523DA2BE-77E3-4920-AB9F-9CF942F9F562@mitre.org> <024BA787-B0BD-4873-A0A4-67F678DD5081@mitre.org> Date: Sat, 12 Mar 2011 01:21:30 -0500 Message-ID: Subject: Re: custom ValueSource for decoding geohash into lat & lon From: Ryan McKinley To: dev@lucene.apache.org Cc: "Smiley, David W." Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org Rather then use the FieldCache, you may consider a WeakHashMap solr uses this and the internals of FieldCache are implemented like this. Long term, I want to see the FieldCache moved to a map directly on the IndexReader (LUCENE-2665 but that has a ways to go) On Fri, Mar 11, 2011 at 5:25 PM, Smiley, David W. wrote= : > On Mar 10, 2011, at 6:21 PM, William Bell wrote: > >> 1. ValueSources does not support MultiValue fields. > > I think the problem isn't ValueSources, it's the FieldCache. =A0The Field= Cache is fundamentally very limited to one indexed primitive value per docu= ment. I took a look at UninvertedField but that appears to be tied to facet= ing and it's not sufficiently flexible any way. I think I need to do, as Un= invertedField does, create a cache registered in solrconfig.xml. =A0The oth= er tricky bit is somehow accessing it. =A0I think I figured it out. In my f= ield type's getValueSource(SchemaField field, QParser parser), the parser i= s a FunctionQParser implementation, which has access to SolrQueryRequest, w= hich has access to SolrIndexSearcher, which allows me to lookup the cache b= y the name I choose. =A0That's quite a chain of indirection that took time = to track down; I nearly gave up :-). > > ~ David > --------------------------------------------------------------------- > To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org > For additional commands, e-mail: dev-help@lucene.apache.org > > --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org For additional commands, e-mail: dev-help@lucene.apache.org