Yes, the svn trunk uses skipTo more often than 1.4.3.

However, your implementation of skipTo() needs some improvement.
See the javadoc of skipTo of class Scorer:

http://lucene.apache.org/java/docs/api/org/apache/lucene/search/ Scorer.html#skipTo(int)

What's wrong with the version I sent? Remeber that there can be at most one document in a MemoryIndex. So the "target" parameter can safely be ignored, as far as I can see.



In case the underlying scorers provide skipTo() it's even better to use that.



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


Wolfgang.


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



Reply via email to