Fix TermsAggregatorTests to not use LuceneTestCase.newSearcher since it needs a DirectoryReader.
This commit is contained in:
parent
f89bb18a5d
commit
f1d7721932
|
@ -52,7 +52,8 @@ public class TermsAggregatorTests extends AggregatorTestCase {
|
|||
indexWriter.close();
|
||||
|
||||
IndexReader indexReader = DirectoryReader.open(directory);
|
||||
IndexSearcher indexSearcher = newSearcher(indexReader, true, true);
|
||||
// We do not use LuceneTestCase.newSearcher because we need a DirectoryReader
|
||||
IndexSearcher indexSearcher = new IndexSearcher(indexReader);
|
||||
|
||||
for (TermsAggregatorFactory.ExecutionMode executionMode : TermsAggregatorFactory.ExecutionMode.values()) {
|
||||
TermsAggregationBuilder aggregationBuilder = new TermsAggregationBuilder("_name", ValueType.STRING)
|
||||
|
|
Loading…
Reference in New Issue