Return-Path: Delivered-To: apmail-lucene-java-user-archive@www.apache.org Received: (qmail 66616 invoked from network); 17 Oct 2006 22:32:14 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 17 Oct 2006 22:32:14 -0000 Received: (qmail 85191 invoked by uid 500); 17 Oct 2006 22:32:10 -0000 Delivered-To: apmail-lucene-java-user-archive@lucene.apache.org Received: (qmail 85093 invoked by uid 500); 17 Oct 2006 22:32:09 -0000 Mailing-List: contact java-user-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: java-user@lucene.apache.org Delivered-To: mailing list java-user@lucene.apache.org Received: (qmail 84981 invoked by uid 99); 17 Oct 2006 22:32:07 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 17 Oct 2006 15:32:07 -0700 X-ASF-Spam-Status: No, hits=4.8 required=10.0 tests=DNS_FROM_RFC_ABUSE,DNS_FROM_RFC_POST,DNS_FROM_RFC_WHOIS,HTML_MESSAGE X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Received: from [209.191.91.201] (HELO web36409.mail.mud.yahoo.com) (209.191.91.201) by apache.org (qpsmtpd/0.29) with SMTP; Tue, 17 Oct 2006 15:32:04 -0700 Received: (qmail 57372 invoked by uid 60001); 17 Oct 2006 22:31:43 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:Received:Date:From:Subject:To:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=4ppevgZOczwHFZl8+e7acam6JKeqoD8C84KXj2S13qE1D0qGVgx6eh1Ar4K78v2CpeaZ2E7ys/mp8/hTnLG4yzHYTnDpsgDN1d3+FRTZOfB/Ep3gGHCQo5ud4frLM1yYvofExbiWHpzINffdCQHj1o7SeGyYvMy8mUEEd63LKpQ= ; Message-ID: <20061017223143.57370.qmail@web36409.mail.mud.yahoo.com> Received: from [24.125.100.254] by web36409.mail.mud.yahoo.com via HTTP; Tue, 17 Oct 2006 15:31:43 PDT Date: Tue, 17 Oct 2006 15:31:43 -0700 (PDT) From: vasu shah Subject: Re: PrefixFilter Memory Consumption To: java-user@lucene.apache.org In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="0-279634796-1161124303=:52813" Content-Transfer-Encoding: 8bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N --0-279634796-1161124303=:52813 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Thanks for the explanation. I am using ChainedFilter and it is taking some more time than using just one Filter. I read somewhere on the lucene forums that the speed can be increased for Filters if we have a large bitset and then work on it. Is it possible and if yes, how? I would like to know the technique. Thanks once again. -Vasu Yonik Seeley wrote: On 10/17/06, vasu shah wrote: > Can anyone please tell as to what is the difference between PrefixFilter and WildcardQuery as far as memory is concerned? > > I saw the code of PrefixFilter and it gets TermEnum for all the terms in the index. Won't this consume memory?? It takes time, not memory. TermEnum is like an iterator - it doesn't keep everything it iterates over in memory. The memory for filters will be for the bitset (1 bit for every document in the index, so a 1M doc index will take 125KB of mem per filter). Both PrefixQuery and PrefixFilter need to use a TermEnum, the difference is what they do with the resulting terms. -Yonik http://incubator.apache.org/solr Solr, the open-source Lucene search server --------------------------------------------------------------------- To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org For additional commands, e-mail: java-user-help@lucene.apache.org --------------------------------- All-new Yahoo! Mail - Fire up a more powerful email and get things done faster. --0-279634796-1161124303=:52813--