mirror of https://github.com/apache/lucene.git
Force merge into a single segment before getting the directory reader (#12138)
The test assumes a single segment is created (because only one scorer is created from the leaf contexts). But, force merging wasn't done before getting the reader. Forcemerge to a single segment before getting the reader.
This commit is contained in:
parent
f38d51ee89
commit
7baa01b3c2
|
@ -403,8 +403,8 @@ public class TestFeatureField extends LuceneTestCase {
|
||||||
pageRankDoc.add(pagerank);
|
pageRankDoc.add(pagerank);
|
||||||
writer.addDocument(pageRankDoc);
|
writer.addDocument(pageRankDoc);
|
||||||
|
|
||||||
reader = writer.getReader();
|
|
||||||
writer.forceMerge(1);
|
writer.forceMerge(1);
|
||||||
|
reader = writer.getReader();
|
||||||
}
|
}
|
||||||
|
|
||||||
IndexSearcher searcher = LuceneTestCase.newSearcher(reader);
|
IndexSearcher searcher = LuceneTestCase.newSearcher(reader);
|
||||||
|
|
Loading…
Reference in New Issue