Return-Path: Delivered-To: apmail-jakarta-lucene-user-archive@www.apache.org Received: (qmail 99487 invoked from network); 1 Mar 2005 13:17:16 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 1 Mar 2005 13:17:16 -0000 Received: (qmail 38496 invoked by uid 500); 1 Mar 2005 13:17:13 -0000 Delivered-To: apmail-jakarta-lucene-user-archive@jakarta.apache.org Received: (qmail 38451 invoked by uid 500); 1 Mar 2005 13:17:12 -0000 Mailing-List: contact lucene-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Lucene Users List" Reply-To: "Lucene Users List" Delivered-To: mailing list lucene-user@jakarta.apache.org Received: (qmail 24088 invoked by uid 99); 1 Mar 2005 13:07:55 -0000 X-ASF-Spam-Status: No, hits=0.6 required=10.0 tests=DNS_FROM_RFC_ABUSE,NO_REAL_NAME X-Spam-Check-By: apache.org Received-SPF: pass (hermes.apache.org: local policy) Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; b=RehG2+a1M0PIWc0zMoPuf4+PDBhYKoPUsTj3w4p1iPapGl/itq4OlLzyOzO1HO45oBw10PozKMczeZPuareyNyehgw/y+zH9EVwKSVXZRK9BahW+39mZoZago85TLpKRbFy7ZyItlbfzyVONWfqOzgnMfurFE5rieWv3OBaGkMA= ; Message-ID: <20050301130751.57149.qmail@web54606.mail.yahoo.com> Date: Tue, 1 Mar 2005 05:07:51 -0800 (PST) From: Reply-To: tomsdepot-lucene@yahoo.com Subject: Re: Custom filters & document numbers To: Lucene Users List In-Reply-To: <010c01c51a7c$ebaa98a0$d380a8c0@sirma.int> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N I'm also interested in knowing what can change the doc numbers. Does this happen frequently? Like Stanislav has been asking... what sort of operations on the index cause the document number to change for any given document? If the document numbers change frequently, is there a straightforward way to modify Lucene to keep the document numbers the same for the life of the document? I'd like to have mappings in my sql database that point to the document numbers that Lucene search returns in its Hits objects. Thanks, -Tom- --- Stanislav Jordanov wrote: > The first statement is clear to me: > I know that an IndexReader sees a 'snapshot' of the document set that was > taken in the moment of the Reader's creation. > > What I don't know is whether this 'snapshot' has also its doc numbers fixed > or they may change asynchronously. > And another thing I don't know is what are the index operations that may > cause the (doc -> doc number) mapping to change. > Is it only after delete or there are other ocasions, or I'd better not count > on this at all. > > StJ > > ----- Original Message ----- > From: "Vanlerberghe, Luc" > To: "Lucene Users List" > Sent: Thursday, February 24, 2005 4:07 PM > Subject: RE: Custom filters & document numbers > > > > An IndexReader will always see the same set of documents. > > Even if another process deletes some documents, adds new ones or > > optimizes the complete index, your IndexReader instance will not see > > those changes. > > > > If you detect that the Lucene index changed (e.g. by calling > > IndexReader.getCurrentVersion(...) once in a while), you should close > > and reopen your 'current' IndexReader and recalculate any data that > > relies on the Lucene document numbers. > > > > Regards, Luc. > > > > -----Original Message----- > > From: Stanislav Jordanov [mailto:stenly@sirma.bg] > > Sent: donderdag 24 februari 2005 14:18 > > To: Lucene Users List > > Subject: Custom filters & document numbers > > > > Given an IndexReader a custom filter is supposed to create a bit set, > > that maps each document numbers to {'visible', 'invisible'} On the other > > hand, it is stated that Lucene is allowed to change document numbers. > > Is it guaranteed that this BitSet's view of document numbers won't > > change while the BitSet is still in use (or perhaps the corresponding > > IndexReader is still opened) ? > > > > And another (more low-level) question. > > When Lucene may change document numbers? > > Is it only when the index is optimized after there has been a delete > > operation? > > > > Regards: StJ > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org > > For additional commands, e-mail: lucene-user-help@jakarta.apache.org > > > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org > > For additional commands, e-mail: lucene-user-help@jakarta.apache.org > > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org > For additional commands, e-mail: lucene-user-help@jakarta.apache.org > > --------------------------------------------------------------------- To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org For additional commands, e-mail: lucene-user-help@jakarta.apache.org