lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Darren Govoni <dar...@ontrenet.com>
Subject Re: Get id of Document just added?
Date Sat, 16 Aug 2008 18:13:30 GMT
Yeah, you are right. Was looking for a lazy way to avoid writing 5 lines
of code. Hehe.

Thanks,
Darren


On Sat, 2008-08-16 at 10:44 -0400, Mark Miller wrote:
> 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
> 


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