Return-Path: Delivered-To: apmail-lucene-java-user-archive@www.apache.org Received: (qmail 83691 invoked from network); 27 Jul 2006 07:44:56 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 27 Jul 2006 07:44:56 -0000 Received: (qmail 97702 invoked by uid 500); 27 Jul 2006 07:44:50 -0000 Delivered-To: apmail-lucene-java-user-archive@lucene.apache.org Received: (qmail 97679 invoked by uid 500); 27 Jul 2006 07:44:50 -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 97668 invoked by uid 99); 27 Jul 2006 07:44:50 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 27 Jul 2006 00:44:50 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: neutral (asf.osuosl.org: local policy) Received: from [169.229.70.167] (HELO rescomp.berkeley.edu) (169.229.70.167) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 27 Jul 2006 00:44:49 -0700 Received: by rescomp.berkeley.edu (Postfix, from userid 1007) id 543875B77F; Thu, 27 Jul 2006 00:44:21 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by rescomp.berkeley.edu (Postfix) with ESMTP id 49C4F7F403 for ; Thu, 27 Jul 2006 00:44:21 -0700 (PDT) Date: Thu, 27 Jul 2006 00:44:21 -0700 (PDT) From: Chris Hostetter To: java-user@lucene.apache.org Subject: Re: Method to speed up caching for faceted navigation In-Reply-To: Message-ID: References: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N : I looked at the implementation of 'read(int[], int[])' in : 'SegmentTermDocs' and saw that it did the following things: : - check if the document has a frequency higher than 1, and if so read : it; : - check if the document has been deleted, and if so don't add it to the : result; : - store the document IDs, counts and frequences in attributes instead of : local variables. : : Given that the following preconditions hold in my situation: : - all documents have a frequency of 1 for the term; : - I never delete documents using the 'IndexReader' from which I get the : 'TermDocs' object; : - I am only interested in the document IDs. I don't think it really matters wether you do deletes on the same IndexReader -- what matters is if there has been any deletes done to the index prior to opening the reader since it was last optimized. The reason being that deleting a document just causes a record of the deletion to be made, but no Term/DOc mapping information is removed. So if your index is read only and will never contain any deleted documents, then your method may be safe (i'm not 100% certain of that, just guessing) but if it's possible for documents to be deleted from your index at some point, then i'm 99% sure your approach will result it indicating matches on documents which are no longer "viable" -Hoss --------------------------------------------------------------------- To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org For additional commands, e-mail: java-user-help@lucene.apache.org