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 http://www.thetaphi.de eMail: u...@thetaphi.de > -----Original Message----- > From: Ian Vink [mailto:ianv...@gmail.com] > Sent: Sunday, May 10, 2009 5:04 PM > To: java-user@lucene.apache.org > 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: java-user-unsubscr...@lucene.apache.org For additional commands, e-mail: java-user-h...@lucene.apache.org