The version I sent returns in O(1), if performance was your concern. Or
did you mean something else?

Since 0 is the only document number in the index, a

return target == 0;

might be nice for skipTo(). It doesn't really help performance, though,
and the next() works just as well.

Regards,
Paul Elschot.



It's not just "return target == 0". Internally next() switches a hasNext flag to false, and that makes it a safer operation...

BTW, did you give the unit tests a shot? Or even better, run it against some of your own queries/test data? That might help to shake out other bugs that might potentially be lurking in remote corners...

Cheers,
Wolfgang.


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to