diff --git a/build.gradle b/build.gradle index 0c12aff..b6a7db8 100644 --- a/build.gradle +++ b/build.gradle @@ -227,4 +227,6 @@ licenseHeaders.enabled = false dependencyLicenses.enabled = false thirdPartyAudit.enabled = false loggerUsageCheck.enabled = false -testingConventions.enabled = false \ No newline at end of file +testingConventions.enabled = false +//generatePomFileForNebulaPublication = false +validateNebulaPom.enabled = false diff --git a/gradle.properties b/gradle.properties index 774343f..29f74ec 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,9 +1,9 @@ group = org.xbib.elasticsearch name = elasticsearch-plugin-bundle -version = 7.6.1.0 +version = 7.7.1.0 -elasticsearch.version = 7.6.1 -lucene.version = 8.4.0 +elasticsearch.version = 7.7.1 +lucene.version = 8.5.1 icu4j.version = 67.1 standardnumber.version = 1.0.1 diff --git a/src/main/java/org/xbib/elasticsearch/plugin/bundle/BundlePlugin.java b/src/main/java/org/xbib/elasticsearch/plugin/bundle/BundlePlugin.java index cb4e35a..2320f51 100644 --- a/src/main/java/org/xbib/elasticsearch/plugin/bundle/BundlePlugin.java +++ b/src/main/java/org/xbib/elasticsearch/plugin/bundle/BundlePlugin.java @@ -281,10 +281,10 @@ public List getRestHandlers(Settings settings, Supplier nodesInCluster) { List extra = new ArrayList<>(); if (settings.getAsBoolean("plugins.xbib.isbnformat.enabled", true)) { - extra.add(new RestISBNFormatterAction(restController)); + extra.add(new RestISBNFormatterAction()); } if (settings.getAsBoolean("plugins.xbib.langdetect.enabled", true)) { - extra.add(new RestLangdetectAction( restController)); + extra.add(new RestLangdetectAction()); } return extra; } diff --git a/src/main/java/org/xbib/elasticsearch/plugin/bundle/index/mapper/icu/IcuCollationKeyFieldMapper.java b/src/main/java/org/xbib/elasticsearch/plugin/bundle/index/mapper/icu/IcuCollationKeyFieldMapper.java index cf3dc72..e5d7b42 100644 --- a/src/main/java/org/xbib/elasticsearch/plugin/bundle/index/mapper/icu/IcuCollationKeyFieldMapper.java +++ b/src/main/java/org/xbib/elasticsearch/plugin/bundle/index/mapper/icu/IcuCollationKeyFieldMapper.java @@ -147,7 +147,7 @@ protected BytesRef indexedValueForSearch(Object value) { @Override public Query fuzzyQuery(Object value, Fuzziness fuzziness, int prefixLength, int maxExpansions, - boolean transpositions) { + boolean transpositions, QueryShardContext context) { throw new UnsupportedOperationException(); } diff --git a/src/main/java/org/xbib/elasticsearch/plugin/bundle/index/mapper/reference/ReferenceMapper.java b/src/main/java/org/xbib/elasticsearch/plugin/bundle/index/mapper/reference/ReferenceMapper.java index 120c51b..083906e 100644 --- a/src/main/java/org/xbib/elasticsearch/plugin/bundle/index/mapper/reference/ReferenceMapper.java +++ b/src/main/java/org/xbib/elasticsearch/plugin/bundle/index/mapper/reference/ReferenceMapper.java @@ -306,7 +306,7 @@ public Query existsQuery(QueryShardContext context) { @Override public Query fuzzyQuery(Object value, Fuzziness fuzziness, int prefixLength, int maxExpansions, - boolean transpositions) { + boolean transpositions, QueryShardContext context) { throw new UnsupportedOperationException(); } diff --git a/src/main/java/org/xbib/elasticsearch/plugin/bundle/rest/action/isbnformat/RestISBNFormatterAction.java b/src/main/java/org/xbib/elasticsearch/plugin/bundle/rest/action/isbnformat/RestISBNFormatterAction.java index f0c7236..4571de8 100644 --- a/src/main/java/org/xbib/elasticsearch/plugin/bundle/rest/action/isbnformat/RestISBNFormatterAction.java +++ b/src/main/java/org/xbib/elasticsearch/plugin/bundle/rest/action/isbnformat/RestISBNFormatterAction.java @@ -1,16 +1,17 @@ package org.xbib.elasticsearch.plugin.bundle.rest.action.isbnformat; import org.elasticsearch.client.node.NodeClient; -import org.elasticsearch.common.inject.Inject; import org.elasticsearch.rest.BaseRestHandler; -import org.elasticsearch.rest.RestController; import org.elasticsearch.rest.RestRequest; import org.elasticsearch.rest.action.RestStatusToXContentListener; import org.xbib.elasticsearch.plugin.bundle.action.isbnformat.ISBNFormatAction; import org.xbib.elasticsearch.plugin.bundle.action.isbnformat.ISBNFormatRequest; import java.io.IOException; +import java.util.List; +import static java.util.Arrays.asList; +import static java.util.Collections.unmodifiableList; import static org.elasticsearch.rest.RestRequest.Method.GET; /** @@ -18,11 +19,12 @@ */ public class RestISBNFormatterAction extends BaseRestHandler { - @Inject - public RestISBNFormatterAction(RestController controller) { - super(); - controller.registerHandler(GET, "/_isbn", this); - controller.registerHandler(GET, "/_isbn/{value}", this); + @Override + public List routes() + { + return unmodifiableList(asList( + new Route(GET, "/_isbn"), + new Route(GET, "/_isbn/{value}"))); } @Override diff --git a/src/main/java/org/xbib/elasticsearch/plugin/bundle/rest/action/langdetect/RestLangdetectAction.java b/src/main/java/org/xbib/elasticsearch/plugin/bundle/rest/action/langdetect/RestLangdetectAction.java index c0c4a9c..3788f0a 100644 --- a/src/main/java/org/xbib/elasticsearch/plugin/bundle/rest/action/langdetect/RestLangdetectAction.java +++ b/src/main/java/org/xbib/elasticsearch/plugin/bundle/rest/action/langdetect/RestLangdetectAction.java @@ -3,19 +3,20 @@ import org.elasticsearch.client.node.NodeClient; import org.elasticsearch.common.CheckedConsumer; import org.elasticsearch.common.bytes.BytesReference; -import org.elasticsearch.common.inject.Inject; import org.elasticsearch.common.xcontent.DeprecationHandler; import org.elasticsearch.common.xcontent.XContentParser; import org.elasticsearch.common.xcontent.XContentType; import org.elasticsearch.rest.BaseRestHandler; -import org.elasticsearch.rest.RestController; import org.elasticsearch.rest.RestRequest; import org.elasticsearch.rest.action.RestStatusToXContentListener; import org.xbib.elasticsearch.plugin.bundle.action.langdetect.LangdetectAction; import org.xbib.elasticsearch.plugin.bundle.action.langdetect.LangdetectRequest; import java.io.IOException; +import java.util.List; +import static java.util.Arrays.asList; +import static java.util.Collections.unmodifiableList; import static org.elasticsearch.rest.RestRequest.Method.GET; import static org.elasticsearch.rest.RestRequest.Method.POST; @@ -24,13 +25,12 @@ */ public class RestLangdetectAction extends BaseRestHandler { - @Inject - public RestLangdetectAction(RestController controller) { - super(); - controller.registerHandler(GET, "/_langdetect", this); - controller.registerHandler(GET, "/_langdetect/{profile}", this); - controller.registerHandler(POST, "/_langdetect", this); - controller.registerHandler(POST, "/_langdetect/{profile}", this); + @Override + public List routes() { + return unmodifiableList(asList(new Route(GET, "/_langdetect/health"), + new Route(GET, "/_langdetect/{profile}"), + new Route(POST, "/_langdetect"), + new Route(POST, "/_langdetect/{profile}"))); } @Override