lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael McCandless <>
Subject Re: custom indexing
Date Wed, 16 Jun 2010 14:53:30 GMT
On Wed, Jun 16, 2010 at 10:30 AM, John Wang <> wrote:
> Thanks Michael!
> For 1), I only see the api to get the uniqueTerms for the entire reader, not
> for a specific field. Am I looking at the wrong place?

Ahh sorry I missed that you need it per-field.  Yes, flex now makes it
possible.  If the reader is composite, do this:

  MultiFields.getTerms(reader, field).getUniqueTermCount();

else (definitely a single segment):


(But you should null-check the returned Fields (in case reader has no
fields) and Terms (in case the specified field does not exist)).

> 2) Awesome!!! Is there a wiki on flex indexing somewhere?

There's a start at

But it doesn't document in detail how to make your own Codec --
probably simplest way to get started is look @ the core Codecs.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message