Operating System: All
The multiSearch class reuses Query objects. Unfortunately some Query sub-classes
initialize the search with terms from the index that they are first used on.
This means that subsequent uses on other indexes can result in missing hits.
For example subclasses of MultiTermQuery pre "populate" their terms from the
first index. If this query is used again then the terms are not reset so the
query is in effect done over terms extracted from the 1st index and not the 2nd.
So the query
when expanded using terms from the first index as
a1b a2b a3b
and it is this query that is performed multiple times.
If a second index has the terms
a1b a2b a3b a4b a5b
then potential results are missing. The latter two terms are not considered in
This can easily be seen by "reversing" the order of Searcher objects in a
MultiSearcher query. Different results can be displayed depending on the ordering.
The solution would be to allow queries to be "reset" - thus removing the cache