lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Hostetter <>
Subject Re: Obtain terms for only particular field(s)
Date Thu, 04 May 2006 20:32:32 GMT

: As I understand - IndexReader.terms() returns a termEnum of all the
: terms in the index, and I would have to iterate through all of them to
: pick out the ones from the fields that I want. Is there a better way
: to do this?

the TermEnum is garunteed to be in order.  you can seek to a particular
term, and you can stop iterating when you reach a term you don't like --
so you can seek to soemthing like Term("foo","") and stop when the field
doesn't equal "foo" and know that you have seen every term in the field


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

View raw message