lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Miller <markrmil...@gmail.com>
Subject Re: Get id of Document just added?
Date Sat, 16 Aug 2008 14:44:37 GMT
Darren Govoni wrote:
> Hi,
>   I combed through the API and some of the mailing list. I need
> to get the id of a Document just added. How should this be done?
> I'm using Lucene 2.3.2.
>
> thank you,
> Darren
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>
>   
The id given by lucene is for internal use and will not remain the same 
for each document after deletes, merges, etc. You shouldn't need it. Do 
you really?

Instead, you should index a field called id and populate it yourself - 
thats most likely the type of id your looking for.

- Mark

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