Re: [Fwd: TermEnum usage]

2010-07-22 Thread Ben West
Hey Vincent,

I am not a dev, but for example look at FuzzyQuery.cs (starting at line 148):

do 
{
  float score = 0.0f;
  Term t = enumerator.Term();
  if (t != null) 
  {
// some stuff with t
  }
}
while (enumerator.Next());

you can see that it is expecting the enumerator to have a term in it before it 
calls next [i.e. it is using do...while rather than just while]. So I think 
this is expected behavior, although it may not be intuitive.

Hope this helps,
-Ben

--- On Thu, 7/22/10, Vincent DARON vda...@ask.be wrote:

 From: Vincent DARON vda...@ask.be
 Subject: [Fwd: TermEnum usage]
 To: lucene-net-dev lucene-net-dev@lucene.apache.org
 Date: Thursday, July 22, 2010, 10:10 AM
 Without any answers, I'm reposting
 once. Do I have to post bug report ?
 
 Let me know
 
 Thanks a lot
 
 Vincent DARON
 ASK
 


  


RE: [Fwd: TermEnum usage]

2010-07-22 Thread Digy
It is expected behavior. Please see 

http://lucene.apache.org/java/2_9_2/api/all/org/apache/lucene/index/IndexReader.html#terms%28org.apache.lucene.index.Term%29

DIGY

-Original Message-
From: Vincent DARON [mailto:vda...@ask.be] 
Sent: Thursday, July 22, 2010 6:10 PM
To: lucene-net-dev
Subject: [Fwd: TermEnum usage]

Without any answers, I'm reposting once. Do I have to post bug report ?

Let me know

Thanks a lot

Vincent DARON
ASK