Sfoglia il codice sorgente

Fix compilation issues in example-plugins (#83258)

Commit 051e1d6c3cc04f325703ca846dc84f58a0ece00e broke a couple of the
example plugins project, so get them working again.
Rory Hunter 3 anni fa
parent
commit
5f98acc04b

+ 5 - 0
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 class CustomSuggestionBuilder extends SuggestionBuilder<CustomSuggestionB
         return customSuggestionsContext;
     }
 
+    @Override
+    public Version getMinimalSupportedVersion() {
+        return Version.V_EMPTY;
+    }
 }

+ 6 - 0
plugins/examples/rescore/src/main/java/org/elasticsearch/example/rescore/ExampleRescoreBuilder.java

@@ -29,6 +29,7 @@ import org.elasticsearch.index.query.SearchExecutionContext;
 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 class ExampleRescoreBuilder extends RescorerBuilder<ExampleRescoreBuilder
         }
 
     }
+
+    @Override
+    public Version getMinimalSupportedVersion() {
+        return Version.V_EMPTY;
+    }
 }

+ 1 - 1
plugins/examples/settings.gradle

@@ -62,7 +62,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.")
   }