lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Doug Cutting <>
Subject Re: Custom filters & document numbers
Date Tue, 01 Mar 2005 18:19:05 GMT 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.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message