[prev in list] [next in list] [prev in thread] [next in thread] 

List:       lucene-user
Subject:    Re: Custom filters & document numbers
From:       Doug Cutting <cutting () apache ! org>
Date:       2005-03-01 18:19:05
Message-ID: 4224B219.4080001 () apache ! org
[Download RAW message or body]

tomsdepot-lucene@yahoo.com wrote:
> 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?

Documents are only re-numbered after there have been deletions.  Once 
there have been deletions, renumbering may be triggered by any document 
addition or index optimization.  Once an index is optimized, no 
renumbering will be performed unril more deletions are made.

> 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.

If you require a persistent document id that survives deletions, then 
add it as a field to your documents.

Doug

---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-user-help@jakarta.apache.org

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic