lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Erik Hatcher <e...@ehatchersolutions.com>
Subject Re: indexed document id
Date Sat, 30 Jul 2005 00:46:56 GMT

On Jul 29, 2005, at 4:40 PM, Chris Fraschetti wrote:
> I've got an index which I rebuild each time and don't do any deletes
> until the end, so doc ids shouldn't change... at index time, is there
> a better way to discover the id of the document i just added than
> docCount() ?

When building a new index by strictly adding documents, you could  
keep a zero-based counter which would reflect document id at that  
time.  They are simply in ascending order.

     Erik


---------------------------------------------------------------------
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