lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marvin Humphrey <mar...@rectangular.com>
Subject Re: Problems about using Lucene to generate tag cloud..
Date Mon, 07 Apr 2008 05:55:19 GMT

On Apr 1, 2008, at 2:57 PM, Daniel Noll wrote:
> On Tuesday 01 April 2008 18:51:55 Dominique BĂ©jean wrote:
>>        IndexReader reader = IndexReader.open(temp_index);
>>        TermEnum terms = reader.terms();
>>
>>        while (terms.next()) {
>>            String field = terms.term().field();
>
> Gotcha: after calling terms() it's already pointing at the first  
> term.  So you
> need to rewrite this as a do-while loop.
>
> Possibly my least favourite feature of Lucene. :-(

What would a better API look like?

Marvin Humphrey
Rectangular Research
http://www.rectangular.com/


---------------------------------------------------------------------
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