Return-Path: Delivered-To: apmail-jakarta-lucene-dev-archive@www.apache.org Received: (qmail 49170 invoked from network); 6 Jan 2005 21:14:43 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 6 Jan 2005 21:14:43 -0000 Received: (qmail 8929 invoked by uid 500); 6 Jan 2005 21:14:42 -0000 Delivered-To: apmail-jakarta-lucene-dev-archive@jakarta.apache.org Received: (qmail 8904 invoked by uid 500); 6 Jan 2005 21:14:42 -0000 Mailing-List: contact lucene-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Lucene Developers List" Reply-To: "Lucene Developers List" Delivered-To: mailing list lucene-dev@jakarta.apache.org Received: (qmail 8891 invoked by uid 99); 6 Jan 2005 21:14:42 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: neutral (hermes.apache.org: local policy) Received: from rwcrmhc12.comcast.net (HELO rwcrmhc12.comcast.net) (216.148.227.85) by apache.org (qpsmtpd/0.28) with ESMTP; Thu, 06 Jan 2005 13:14:40 -0800 Received: from [192.168.168.81] (c-24-5-160-217.client.comcast.net[24.5.160.217]) by comcast.net (rwcrmhc12) with ESMTP id <2005010621143801400gfo52e>; Thu, 6 Jan 2005 21:14:39 +0000 Message-ID: <41DDAA3E.20408@apache.org> Date: Thu, 06 Jan 2005 13:14:38 -0800 From: Doug Cutting User-Agent: Mozilla Thunderbird 0.9 (X11/20041127) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Lucene Developers List Subject: Re: DO NOT REPLY [Bug 32965] - Use filter bits for next() and skipTo() in FilteredQuery References: <200501061913.j06JDUoR018522@ajax.apache.org> In-Reply-To: <200501061913.j06JDUoR018522@ajax.apache.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N bugzilla@apache.org wrote: > ------- Additional Comments From paul.elschot@xs4all.nl 2005-01-06 20:13 ------- > Patch to IndexSearcher.java to use FilteredQuery I like where this is going, and want to take it further! Why not patch Searcher.java instead of IndexSearcher.java? Once that's done, Filters could be removed from the Searchable interface and only appear (for back-compatibility and/or convenience) in Searcher utility methods. This would simplify auto-filtering. Instead of a Query -> Query+Filter transformation, we could just use a Query -> Query transformation. For example, the rewrite method on BooleanQuery could look for clauses which are somehow declared non-scoring (e.g., boost=0) and, when these exist, rewrite itself as a FilteredQuery, constructing a Filter for all of the non-scoring clauses. There's still the issue of caching filters. This might be as simple as: (a) combine the caches used by QueryFilter and CachingWrappingFilter; (b) implement the unified cache as an LRU, possibly taking into account different filter sizes, etc. (c) add a Query.getFilterBits(IndexReader, DocIdCollector) method that's implemented with a Scorer by default, but which may be optimized, e.g., for RangeQuery, TermQuery, etc. (d) write a BooleanQueryFilter implementation that uses Query.getFilterBits() to combine a number of clauses into a single bit-vector that can be cached. Does this make any sense? Doug --------------------------------------------------------------------- To unsubscribe, e-mail: lucene-dev-unsubscribe@jakarta.apache.org For additional commands, e-mail: lucene-dev-help@jakarta.apache.org