lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Yonik Seeley" <>
Subject Re: maxDoc and arrays
Date Thu, 24 May 2007 20:36:28 GMT
On 5/24/07, Carlos Pita <> wrote:
> Yes Erick, that's fine. But the fact is that I'm not sure whether the next
> added document will have an id equal to maxDocs.

Yes.  The highest docId will always be the last document added, and
docIds are never re-arranged with respect to each other.

So if you do an addDocument(), it will have an id of maxDoc()-1
*But* beware of renumbering caused by squeezing out of deleted docs on
segment merges, as I mentioned in the last message.


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

View raw message