lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stanislav Jordanov" <ste...@sirma.bg>
Subject Re: Custom filters & document numbers
Date Thu, 24 Feb 2005 14:27:08 GMT
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" <Luc.Vanlerberghe@bvdep.com>
To: "Lucene Users List" <lucene-user@jakarta.apache.org>
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


Mime
View raw message