Skip to content

changes for elasticsearch 7.7.x #40

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: 7.6
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -227,4 +227,6 @@ licenseHeaders.enabled = false
dependencyLicenses.enabled = false
thirdPartyAudit.enabled = false
loggerUsageCheck.enabled = false
testingConventions.enabled = false
testingConventions.enabled = false
//generatePomFileForNebulaPublication = false
validateNebulaPom.enabled = false
6 changes: 3 additions & 3 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -281,10 +281,10 @@ public List<RestHandler> getRestHandlers(Settings settings,
Supplier<DiscoveryNodes> nodesInCluster) {
List<RestHandler> 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;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,28 +1,30 @@
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;

/**
* REST ISBN format action.
*/
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<Route> routes()
{
return unmodifiableList(asList(
new Route(GET, "/_isbn"),
new Route(GET, "/_isbn/{value}")));
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand All @@ -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<Route> routes() {
return unmodifiableList(asList(new Route(GET, "/_langdetect/health"),
new Route(GET, "/_langdetect/{profile}"),
new Route(POST, "/_langdetect"),
new Route(POST, "/_langdetect/{profile}")));
}

@Override
Expand Down