lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Uwe Schindler" <>
Subject RE: Distinct terms values? (like in Luke)
Date Sun, 10 May 2009 15:35:19 GMT
You can get this list using IndexReader.terms(new Term(fieldname,"")). This
returns an enumeration of all terms starting with the given one (the field
name). Just iterate over the TermEnum util the field name of the iterated
term changes.

Uwe Schindler
H.-H.-Meier-Allee 63, D-28213 Bremen

> -----Original Message-----
> From: Ian Vink []
> Sent: Sunday, May 10, 2009 5:04 PM
> To:
> Subject: Distinct terms values? (like in Luke)
> I have tagged each of my documents with a term "religion" and values like
> "Baha'i, Christian, Jewish, Islam" etc.
> In Luke it shows me that I have a term count of 8 for the term "religion"
> How do I get a list of the 8 distinct values for the term religion from an
> index?
> Ian

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

View raw message