lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Hostetter <hossman_luc...@fucit.org>
Subject Re: List of values from refix query
Date Mon, 05 Sep 2005 22:10:34 GMT

: How can I get all values across the documents with a given prefix?
: For prefix = "var" for example I would like to have a list of all 5 values.
:
: For prefix = "var_no" for example I would like to have a list of the values
: {"var_no1", "var_no2", "var_no3"}.

if you just want the values, you can use a TermEnum and stop iterating
when the Terms no longer match the prefix (or no longer match the field)

take a look at the javadocs for IndexReader.terms(Term) and try executing
"reader.terms(new Term("variable","var_no"));




-Hoss


---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Mime
View raw message