Skip to content

Commit

Permalink
Fix compilation failure in QueryParserHelperBenchmark (elastic#82707)
Browse files Browse the repository at this point in the history
Adjust it for the changes introduced in elastic#82643
  • Loading branch information
arteam authored Jan 18, 2022
1 parent d11973b commit 74f682a
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
import org.elasticsearch.common.compress.CompressedXContent;
import org.elasticsearch.common.io.stream.NamedWriteableRegistry;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.common.xcontent.LoggingDeprecationHandler;
import org.elasticsearch.core.internal.io.IOUtils;
import org.elasticsearch.index.IndexSettings;
import org.elasticsearch.index.analysis.AnalyzerScope;
Expand All @@ -45,6 +46,7 @@
import org.elasticsearch.script.ScriptCompiler;
import org.elasticsearch.script.ScriptContext;
import org.elasticsearch.xcontent.NamedXContentRegistry;
import org.elasticsearch.xcontent.XContentParserConfiguration;
import org.elasticsearch.xcontent.XContentType;
import org.openjdk.jmh.annotations.Benchmark;
import org.openjdk.jmh.annotations.BenchmarkMode;
Expand Down Expand Up @@ -145,7 +147,8 @@ protected SearchExecutionContext buildSearchExecutionContext() {
mapperService.mappingLookup(),
similarityService,
null,
new NamedXContentRegistry(ClusterModule.getNamedXWriteables()),
XContentParserConfiguration.EMPTY.withRegistry(new NamedXContentRegistry(ClusterModule.getNamedXWriteables()))
.withDeprecationHandler(LoggingDeprecationHandler.INSTANCE),
new NamedWriteableRegistry(ClusterModule.getNamedWriteables()),
null,
new IndexSearcher(indexReader),
Expand Down Expand Up @@ -176,7 +179,8 @@ protected final MapperService createMapperService(String mappings) {
Map.of(),
Map.of()
),
new NamedXContentRegistry(ClusterModule.getNamedXWriteables()),
XContentParserConfiguration.EMPTY.withRegistry(new NamedXContentRegistry(ClusterModule.getNamedXWriteables()))
.withDeprecationHandler(LoggingDeprecationHandler.INSTANCE),
similarityService,
mapperRegistry,
() -> { throw new UnsupportedOperationException(); },
Expand Down

0 comments on commit 74f682a

Please sign in to comment.