lucenenet-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vincent DARON <vda...@ask.be>
Subject TermEnum usage
Date Wed, 14 Jul 2010 09:27:40 GMT
Hi all

I'm using Lucene.NET 2.9.2.2 from SVN.

I try to iterate terms of a field in my index, todo so, i'm using
IndexReader.Terms(f) that return a TermEnum.

The classic usage of iterator is the folowing pattern

TermNum enu = reader.Terms(new Term("myfield"));
while(enu.Next())
{
ProcessTerm(enu.Term());
}

But it seems that the TermEnum is already on the first item BEFORE the
first call to Next. The previous code will therefore always skip the
first Term.

Bug ?

Thanks

Vincent DARON
ASK

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message