lucene-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Lennart Regebro" <>
Subject Re: Getting the terms for a particular field.
Date Fri, 27 Oct 2006 11:37:43 GMT
On 10/25/06, Chris Hostetter <> wrote:
> : The best I have come up with so far is to go through all the terms
> : gotten from the IndexReader.terms() and filter on field(). That works
> you're basically on it, but look at the IndexReader.terms(Term) method
> which allows you to start with a specific term, and then bear in mind that
> the TermEnum goes in order, which means all of the terms for a single
> field will come sequentially, so as soon as you see a field name other
> then the one you are interested in, you know you can stop.
> if you look at the code for RangeFilter you'll see a good example of
> iterating over a TermEnum for a single field ... what you want is
> effectively the same the work RangeFilter would do when the bounds are
> both null.

That works fine, thanks for the help!

Lennart Regebro, Nuxeo
CPS Content Management

View raw message