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: Document ID
Date Fri, 24 Jun 2005 19:46:05 GMT

On Jun 24, 2005, at 3:08 PM, Yousef Ourabi wrote:

> Hello:
> Is there any way to force the document id inside the lucene index, if
> I have my own internal numbering scheme, it would be nice to have that
> reflected inside the lucene index...anyway?

For a domain-centric identifier, use a custom field to store (and  
index perhaps?) it.  Lucene's Document id's are internal and not  
controllable.

> IF not is the document ID created on creation or on addition to the
> index? And is there a way to retrieve it before it is added to the
> index?

The id is created on addition to the index - the id is merely the  
position of the document in the index and changes when documents are  
deleted before it and the index optimized.  Document id's are not to  
be relied in the long-term.

     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