lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Erick Erickson" <erickerick...@gmail.com>
Subject Re: Lucene id generation
Date Mon, 11 Dec 2006 15:27:49 GMT
I don't believe that this is possible. Or desirable. Lucene IDs are mutable,
even within an index. That is, if you index docs that get, say, IDs 1, 2, 3,
4, 5 and delete doc 2 and optimize, Docs 4 and 5 get reassigned IDs 3 and 4
(or something similar).

You're far better off controlling this yourself. That is, forget Lucene IDs
and make up your own unique IDs that you can guarantee form disjoint sets
across your multiple indexes, then work with those.

Best
Erick

On 12/11/06, Waheed Mohammed <waheed.mohammed@fiz-technik.de> wrote:
>
> Hello,
>
> Is there a way to influence lucene's generation of ids while indexing.
>
> my requirement is. I want to have different indexes where no index should
> have
> ids that have been assigned to an index earlier.
> for instance
> IDX1 : {0.........100}
> IDX2: {101.......200}
> IDX3: {201.......300}
> but not
> IDX1 : {0.........100}
> IDX2 : {0.........100}
> IDX3 : {0.........100}
>
> any help is greatly appriciated.
> --
> A W Mohammed
> Software Entwickler
> FIZ-technik e.V
> Frankfut am Main
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message