lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "John Wang" <john.w...@gmail.com>
Subject Re: unique-id to doc-num
Date Mon, 17 Mar 2008 15:45:27 GMT
you can also use the payload to store the docid. michael had a posting on
that a while back.
-John

On Sun, Mar 16, 2008 at 11:43 PM, Chris Hostetter <hossman_lucene@fucit.org>
wrote:

>
> : I'd like to have an up-to-date map from unique-ids to lucene internal
> : doc-nums.
>
> Which way do you want the mapping to go?
>
> You can use the FieldCache to generate a cached mapping from docid to any
> (single value) indexed field.
>
> if you want a mapping from field value to docid, just iterate over a
> TermEnum for your field, you'll get all the field values in lexical order
> and you can use a TermDoc to find which doc(s) are associated with that
> Term.
>
>
>
> -Hoss
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-dev-help@lucene.apache.org
>
>

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