I read a bit into the source code and I found this comment at BooleanQuery.scorer():
// Also, at this point a // BooleanScorer cannot be embedded in a ConjunctionScorer, as the hits // from a BooleanScorer are not always sorted by document number (sigh) // and hence BooleanScorer cannot implement skipTo() correctly, which is // required by ConjunctionScorer.
The test function I used assumes that documents will be collected in order. Could this be the source of the problem?
It could be.
I only realized recently that BooleanScorer does some local reordering of document numbers passed to the HitCollector. There's no easy fix.
When I get a chance I intend to rewrite BooleanScorer to fix this and to correctly implement skipTo(). The result will be somewhat slower for some queries, especially those with a large number of optional terms, but will sometimes be faster when it's nested in other queries, and skipTo() can be leveraged. I would like to get to this in next few weeks, and then make a 1.4 RC1 release. The fix will take a few days work. If I can find someone to fund the work it may happen sooner. Right now other projects have higher priority for me.
Doug
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]