Return-Path: Delivered-To: apmail-lucene-dev-archive@www.apache.org Received: (qmail 12844 invoked from network); 25 Jun 2010 16:59:14 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 25 Jun 2010 16:59:14 -0000 Received: (qmail 25060 invoked by uid 500); 25 Jun 2010 16:59:13 -0000 Delivered-To: apmail-lucene-dev-archive@lucene.apache.org Received: (qmail 24795 invoked by uid 500); 25 Jun 2010 16:59:12 -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 24782 invoked by uid 99); 25 Jun 2010 16:59:12 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 25 Jun 2010 16:59:12 +0000 X-ASF-Spam-Status: No, hits=-1545.3 required=10.0 tests=ALL_TRUSTED,AWL X-Spam-Check-By: apache.org Received: from [140.211.11.22] (HELO thor.apache.org) (140.211.11.22) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 25 Jun 2010 16:59:11 +0000 Received: from thor (localhost [127.0.0.1]) by thor.apache.org (8.13.8+Sun/8.13.8) with ESMTP id o5PGwo2Z020375 for ; Fri, 25 Jun 2010 16:58:51 GMT Message-ID: <17554787.61071277485130914.JavaMail.jira@thor> Date: Fri, 25 Jun 2010 12:58:50 -0400 (EDT) From: "Uwe Schindler (JIRA)" To: dev@lucene.apache.org Subject: [jira] Updated: (LUCENE-2506) A Stateful Filter That Works Across Index Segments In-Reply-To: <11254176.2561277170677166.JavaMail.jira@thor> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/LUCENE-2506?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Uwe Schindler updated LUCENE-2506: ---------------------------------- Fix Version/s: (was: 3.0.2) > A Stateful Filter That Works Across Index Segments > -------------------------------------------------- > > Key: LUCENE-2506 > URL: https://issues.apache.org/jira/browse/LUCENE-2506 > Project: Lucene - Java > Issue Type: Improvement > Components: Index > Affects Versions: 3.0.2 > Reporter: Karthick Sankarachary > Attachments: LUCENE-2506.patch > > > By design, Lucene's Filter abstraction is applied once per segment in the index during searching. In particular, the reader provided to its #getDocIdSet method does not represent the whole underlying index. In other words, if the index has more than one segment the given reader only represents a single segment. > As a result, that definition of the Filter suffers from a limitation in that it does not have the ability to permit/prohibit documents in the search results based on the terms residing in not just the current segment but also the ones that came before it during the search. > To address this limitation, we introduce here a StatefulFilter which specifically builds on the Filter class so as to make it capable of remembering terms in segments spanning the whole > underlying index. To reiterate, the need for making filters stateful stems from the fact that some, although not most, filters care about what terms they may have come across in prior segments. It does so by keeping track of the past terms from prior segments in a cache that is maintained in a StatefulTermsEnum instance on a per-thread basis. > Note that we leave it up to the concrete sub-class of the stateful filter to decide what to remember in its state or what not to. In other words, it can choose to remember as much or as little from prior segments as it desires. In keeping with the TermsEnum interface, which the StatefulTermsEnum class builds on, it must let the searcher know what terms to accept and which ones to skip over. More often than not, the state of the filter will come in handy while implementing that very acceptance logic. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org For additional commands, e-mail: dev-help@lucene.apache.org