lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Yonik Seeley" <yo...@apache.org>
Subject Re: maxDoc and arrays
Date Thu, 24 May 2007 20:36:28 GMT
On 5/24/07, Carlos Pita <carlosjosepita@gmail.com> 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.

-Yonik

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


Mime
View raw message