writerA.close();
writerB.addDocument(lDoc3);
writerB.close();
QueryParser parser = new QueryParser(Version.LUCENE_CURRENT, "fulltext", new StandardAnalyzer(org.apache.lucene.util.Version.LUCENE_CURRENT));
Query query = parser.parse("handle:1");
Searcher[] searchers = new Searcher[2];
searchers[0] = new IndexSearcher(indexStoreB, true);
searchers[1] = new IndexSearcher(indexStoreA, true);
Searcher mSearcher = new MultiSearcher(searchers);
ScoreDoc[] hits = mSearcher.search(query, null, 1000).scoreDocs;
assertEquals(3, hits.length);
Explanation explain = mSearcher.explain(query, hits[0].doc);
String exp = explain.toString(0);
assertTrue(exp, exp.indexOf("maxDocs=3") > -1);
assertTrue(exp, exp.indexOf("docFreq=3") > -1);
query = parser.parse("handle:\"1 2\"");
hits = mSearcher.search(query, null, 1000).scoreDocs;
assertEquals(3, hits.length);
explain = mSearcher.explain(query, hits[0].doc);