Return-Path: Delivered-To: apmail-lucene-java-dev-archive@www.apache.org Received: (qmail 41611 invoked from network); 6 Oct 2009 15:52:22 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 6 Oct 2009 15:52:22 -0000 Received: (qmail 34216 invoked by uid 500); 6 Oct 2009 15:52:21 -0000 Delivered-To: apmail-lucene-java-dev-archive@lucene.apache.org Received: (qmail 34141 invoked by uid 500); 6 Oct 2009 15:52:21 -0000 Mailing-List: contact java-dev-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: java-dev@lucene.apache.org Delivered-To: mailing list java-dev@lucene.apache.org Received: (qmail 34133 invoked by uid 99); 6 Oct 2009 15:52:21 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 06 Oct 2009 15:52:21 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of yseeley@gmail.com designates 209.85.219.214 as permitted sender) Received: from [209.85.219.214] (HELO mail-ew0-f214.google.com) (209.85.219.214) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 06 Oct 2009 15:52:11 +0000 Received: by ewy10 with SMTP id 10so4332428ewy.9 for ; Tue, 06 Oct 2009 08:50:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:reply-to:received :in-reply-to:references:date:x-google-sender-auth:message-id:subject :from:to:content-type; bh=Xusr0sDinOwTgh+lzwOLq0RGm3qeyiYyuTKG1bcvHoI=; b=ry3bMea2MaiPui6tZ1IxSqZNdYf6cSAf/mM/QKV4hlY6VSXM+rRTGSipxRlInV1tXE ljGFgIFH38I/RYCH5xdVrYnedm1ok7hcgW4GYBvJayuKWVI4BJi9Gg6OP0JKJrPFtbQE YplNyLfsdkaJ/hw37DfcwSr50Vs4kpkrwffZ0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:reply-to:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:content-type; b=lCTZpMznDJt45/IHA4UcYgUrl31IHN6VbwpXsYAyWASZIEtuL1tXzgb25sjDTkefQY 2QXXXlR7n0KKnn3XrmTXwHAs/PrOovx7H5nCptNb5MaSt2dgj48jKZhvZ10f85y/7wuu vSLng/x3T67nZxUX/wEZKmTNUQOUIOkRkXOc8= MIME-Version: 1.0 Sender: yseeley@gmail.com Reply-To: yonik@lucidimagination.com Received: by 10.216.49.17 with SMTP id w17mr363254web.128.1254844250623; Tue, 06 Oct 2009 08:50:50 -0700 (PDT) In-Reply-To: <4ACB60BB.7020400@gmail.com> References: <4ACB60BB.7020400@gmail.com> Date: Tue, 6 Oct 2009 11:50:50 -0400 X-Google-Sender-Auth: e0a2184e21e72b3f Message-ID: Subject: Re: De-basing / re-basing docIDs, or how to effectively pass calculated values from a Scorer or Filter up to (Solr's) QueryComponent.process From: Yonik Seeley To: java-dev@lucene.apache.org Content-Type: text/plain; charset=ISO-8859-1 X-Virus-Checked: Checked by ClamAV on apache.org Aaron, could you move this to solr-user? -Yonik http://www.lucidimagination.com On Tue, Oct 6, 2009 at 11:22 AM, Aaron McKee wrote: > > In the code I'm working with, I generate a cache of calculated values as a > by-product within a Filter.getDocidSet implementation (and within a > Query-ized version of the filter and its Scorer method) . These values are > keyed off the IndexReader's docID values, since that's all that's accessible > at that level. Ultimately, however, I need to be able to access these values > much higher up in the stack (Solr's QueryComponent.process method), so that > I can inject the dynamic values into the response as a fake field. The IDs > available here, however, are for the entire index and not just relative to > the current IndexReader. I'm still fairly new to Lucene and I've been > scratching my head a bit trying to find a reliable way to map these values > into the same space, without having to hack up too many base classes. I > noticed that there was a related discussion at: > > http://issues.apache.org/jira/browse/LUCENE-1821?focusedCommentId=12745041#action_12745041 > > ... but also a bit of disagreement on the suggested strategies. Ideally, I'm > also hoping there's a strategy that won't require me to hack up too much of > the core product; subclassing IndexSearcher in the way suggested would > basically require me to change all of the various SearchComponents I use in > Solr, and that sounds like it'd end up a real maintenance nightmare. I was > looking at the Collector class as possible solution, since it has knowledge > of the docbase, but it looks like I'd then need to change every derived > collector that the code ultimately uses and, including the various anonymous > Collectors in Solr, that also looks like it'd be a fairly ghoulish solution. > I suppose I'm being wishful, or lazy, but is there a reasonable and reliable > way to do this, without having to fork the core code? If not, any suggestion > on the best strategy to accomplish this, without adding too much overhead > every time I wanted to up-rev the core Lucene and/or Solr code to the latest > version? > > Thanks a ton, > Aaron --------------------------------------------------------------------- To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org For additional commands, e-mail: java-dev-help@lucene.apache.org