lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Erik Hatcher <>
Subject Re: Document numbers and ids
Date Fri, 04 Feb 2005 09:53:46 GMT
On Feb 4, 2005, at 9:49 AM, Simeon Koptelov wrote:
> The LiA says that I can use Sort.INDEXORDER when indexing order is 
> relevant
> and gives an example where documents' ids (got from ) are
> increasing from top to bottom of resultset. Are that ids the same 
> thing as
> document numbers?

Yes, id is the same as document number.

> If they are the same, how can it be that they are preserved during 
> indexing
> process? LiA says that documents are renumbered when merging segments.

By "renumbered", it means it squeezes out holes left by deletes.  The 
actual order does not change and thus does not affect a Sort.INDEXORDER 

Documents are stored in the index in the order that they were indexed - 
nothing changes this order.  Document id's are not permanent if deletes 
occur followed by an optimize.


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

View raw message