: The method states 'greater than OR EQUAL TO' so your d1 != d2 test is : invalid. : : It should be assert (d2>=d1)
I think you are missreading Doron's spuedo code (either that or i am) ... the 'greater than OR EQUAL TO' statement is regarding the current match and the target (input to skipTo) ... i think Doron's point is that in any calls to skipTo, no matter what the input (target) is, the second call should advance beyond the "current" match so assert(d2 != d1) is valid ... assert(d1 < d2) should also be valid. it just so happens that in this case the input to skipTo happens to bethe same as a previous call. I believe an equally valid test would be... Scorer s = getScorerFromSomewhere() if (s.next()) { int d1 = s.doc(); if (s.skipTo(d1-1)) { assert(d1 < s.doc()); } } -Hoss --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]