------- Additional Comments From [hidden email] 2005-07-05 11:19 -------
Currently, Query.combine() is only called by MultiSearcher and a Highlighter
test case. If I understand it correctly, the intent of this method was to give
Query subclasses a hook to modify the combination algorithm. This hook is not
used by Query subclasses which are part of the Lucene distribution, and I would
be very astonished if someone used it outside of Lucene. Such an implementation
would break now anyway, because BooleanQueries are only handled correctly in the
new Query.combine method, but not in mergeBooleanQueries() (which
reimplementations are supposed to call as helper method).
IMHO the cleanest solution would be to remove combine() and
mergeBooleanQueries() from Query and move the query combination logic to
MultiSearcher. Of course, that would be an incompatible API change, and we can't
be 100% sure that no one needs the combine() hook. On the other hand, we now
have useless code in mergeBooleanQueries() and code which is only used by
MultiSearcher in combine(), and that also isn't a desirable situation.