lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Hostetter <hossman_luc...@fucit.org>
Subject Re: unique-id to doc-num
Date Mon, 17 Mar 2008 06:43:57 GMT

: 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
View raw message