On Wed, Jun 16, 2010 at 10:30 AM, John Wang <[email protected]> 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): reader.fields().terms(field).getUniqueTermCount() (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 http://wiki.apache.org/lucene-java/FlexibleIndexing But it doesn't document in detail how to make your own Codec -- probably simplest way to get started is look @ the core Codecs. Mike --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
