From 2a37261ec0aa5c34c15be16e2b0ae65dd6b943a8 Mon Sep 17 00:00:00 2001 From: Rory Hunter Date: Fri, 28 Jan 2022 13:49:42 +0000 Subject: [PATCH] Fix compilation issues in example-plugins (#83258) Commit 051e1d6c3cc04f325703ca846dc84f58a0ece00e broke a couple of the example plugins project, so get them working again. --- .../example/customsuggester/CustomSuggestionBuilder.java | 5 +++++ .../example/rescore/ExampleRescoreBuilder.java | 6 ++++++ plugins/examples/settings.gradle | 2 +- 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/plugins/examples/custom-suggester/src/main/java/org/elasticsearch/example/customsuggester/CustomSuggestionBuilder.java b/plugins/examples/custom-suggester/src/main/java/org/elasticsearch/example/customsuggester/CustomSuggestionBuilder.java index 50c66869e4758..fa4056515a5bc 100644 --- a/plugins/examples/custom-suggester/src/main/java/org/elasticsearch/example/customsuggester/CustomSuggestionBuilder.java +++ b/plugins/examples/custom-suggester/src/main/java/org/elasticsearch/example/customsuggester/CustomSuggestionBuilder.java @@ -8,6 +8,7 @@ package org.elasticsearch.example.customsuggester; +import org.elasticsearch.Version; import org.elasticsearch.xcontent.ParseField; import org.elasticsearch.common.ParsingException; import org.elasticsearch.common.io.stream.StreamInput; @@ -129,4 +130,8 @@ public SuggestionSearchContext.SuggestionContext build(SearchExecutionContext co return customSuggestionsContext; } + @Override + public Version getMinimalSupportedVersion() { + return Version.V_EMPTY; + } } diff --git a/plugins/examples/rescore/src/main/java/org/elasticsearch/example/rescore/ExampleRescoreBuilder.java b/plugins/examples/rescore/src/main/java/org/elasticsearch/example/rescore/ExampleRescoreBuilder.java index 4182ada9495e3..7109f6686451b 100644 --- a/plugins/examples/rescore/src/main/java/org/elasticsearch/example/rescore/ExampleRescoreBuilder.java +++ b/plugins/examples/rescore/src/main/java/org/elasticsearch/example/rescore/ExampleRescoreBuilder.java @@ -29,6 +29,7 @@ import org.elasticsearch.search.rescore.RescoreContext; import org.elasticsearch.search.rescore.Rescorer; import org.elasticsearch.search.rescore.RescorerBuilder; +import org.elasticsearch.Version; import java.io.IOException; import java.util.Arrays; @@ -212,4 +213,9 @@ public Explanation explain(int topLevelDocId, IndexSearcher searcher, RescoreCon } } + + @Override + public Version getMinimalSupportedVersion() { + return Version.V_EMPTY; + } } diff --git a/plugins/examples/settings.gradle b/plugins/examples/settings.gradle index 14ccdcb71d869..74195d1de7c41 100644 --- a/plugins/examples/settings.gradle +++ b/plugins/examples/settings.gradle @@ -61,7 +61,7 @@ static def getDefaultDistroProjectName() { } else if (os.startsWith("Linux") || os.startsWith("LINUX")) { return isArm ? 'linux-aarch64-tar' : 'linux-tar' } else if (os.startsWith("Mac")) { - return isArm ? 'darwing-aarch64-tar' : 'darwin-tar' + return isArm ? 'darwin-aarch64-tar' : 'darwin-tar' } else { throw new GradleException("Unable to determine system platform type.") }