: It would also simplify some scorers if doc() wasn't undefined before
: next() or skipTo() was called, but instead -1.
+1 ... but if we are goingg to change the API requirements for doc(),
we should clarify the requirements or score() ... with doc(), negative
numbers can easily be used as a marker of "invalid", but the same rule
isn't as easy to apply with the score() method ... perhaps the
documentation for doc() and score() should be...
doc(): Returns the current document number matching the query.
Returns -1 if neither next() or skipTo() have been called at
least once, behavior is undefined if the last call to next()
or skipTo returned false.
score(): Returns the score of the current document matching the query.
The value is undefined if doc() reurns -1, or if the last
call to next() or skipTo returned false.
...we probably want to make the same API changes to Spans, TermEnum,
and TermDocs as well to be consistent.
-Hoss
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]