When writing a custom codec, I encountered an issue in SloppyPhraseScorer.
I am using lucene-4.2 GA.
public int nextDoc()
{
return advance(max.doc)
}
This in-turn calls my DocsAndPositionEnum.advance(int target).
Intially this seems to call with advance(-1). It's kind of unsettling to
see an instruction from lucene API to advance past a negative docId. Also,
sometimes I receive the advance call to the same doc, twice.
Should it be advance(max.doc+1) or something? Has someone faced this issue
before?
--Ravi