lucene-java-user mailing list archives

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


Mime
View raw message