From cc5169dfe4a00db7ed126dea307e6571cc0c9b04 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 27 Feb 2023 15:56:42 +0000 Subject: [PATCH 1/6] Bump maven-compiler-plugin from 3.10.1 to 3.11.0 Bumps [maven-compiler-plugin](https://github.com/apache/maven-compiler-plugin) from 3.10.1 to 3.11.0. - [Release notes](https://github.com/apache/maven-compiler-plugin/releases) - [Commits](https://github.com/apache/maven-compiler-plugin/compare/maven-compiler-plugin-3.10.1...maven-compiler-plugin-3.11.0) --- updated-dependencies: - dependency-name: org.apache.maven.plugins:maven-compiler-plugin dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 09ccc62..b61940a 100644 --- a/pom.xml +++ b/pom.xml @@ -40,7 +40,7 @@ 3.1.1 - 3.10.1 + 3.11.0 3.1.2 2.5.3 3.2.1 From da7034554b035e3f7add8ad46b1bef92aac60c47 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 10 Jul 2023 15:09:34 +0000 Subject: [PATCH 2/6] Bump maven-release-plugin from 2.5.3 to 3.0.1 Bumps [maven-release-plugin](https://github.com/apache/maven-release) from 2.5.3 to 3.0.1. - [Release notes](https://github.com/apache/maven-release/releases) - [Commits](https://github.com/apache/maven-release/compare/maven-release-2.5.3...maven-release-3.0.1) --- updated-dependencies: - dependency-name: org.apache.maven.plugins:maven-release-plugin dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 6ef3377..a018075 100644 --- a/pom.xml +++ b/pom.xml @@ -42,7 +42,7 @@ 3.1.1 3.10.1 3.1.2 - 2.5.3 + 3.0.1 3.2.1 3.4.1 2.22.2 From fd7c9ab9add38309b2d0900f6b8e931669da1a80 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rene=CC=81=20Kriegler?= Date: Tue, 13 Feb 2024 19:25:04 +0100 Subject: [PATCH 3/6] Version for ES 8.9.2 --- assembly.xml | 1 + pom.xml | 5 +++-- .../elasticsearch/DismaxSearchEngineRequestAdapter.java | 3 ++- src/main/java/querqy/elasticsearch/QuerqyPlugin.java | 4 ++-- .../querqy/elasticsearch/query/QuerqyQueryBuilder.java | 6 +++--- .../querqy/elasticsearch/RewriterShardContextsTest.java | 5 +---- .../rewriterstore/NodesReloadRewriterResponseTest.java | 7 +++++-- 7 files changed, 17 insertions(+), 14 deletions(-) diff --git a/assembly.xml b/assembly.xml index 01ea3ec..e0f6995 100644 --- a/assembly.xml +++ b/assembly.xml @@ -1,5 +1,6 @@ + querqy-elasticsearch-zip zip diff --git a/pom.xml b/pom.xml index 6ef3377..0e05db6 100644 --- a/pom.xml +++ b/pom.xml @@ -3,7 +3,7 @@ org.querqy querqy-elasticsearch - 1.8.es853.0-SNAPSHOT + 1.7.es892.0-SNAPSHOT jar @@ -57,7 +57,7 @@ 2.7.0 5.5.lucene900.1 - 8.5.3 + 8.9.2 0.8.8 16 16 @@ -132,6 +132,7 @@ maven-assembly-plugin + false assembly.xml diff --git a/src/main/java/querqy/elasticsearch/DismaxSearchEngineRequestAdapter.java b/src/main/java/querqy/elasticsearch/DismaxSearchEngineRequestAdapter.java index 64747a1..26dfffe 100644 --- a/src/main/java/querqy/elasticsearch/DismaxSearchEngineRequestAdapter.java +++ b/src/main/java/querqy/elasticsearch/DismaxSearchEngineRequestAdapter.java @@ -9,6 +9,7 @@ import org.elasticsearch.common.bytes.BytesArray; import org.elasticsearch.common.lucene.search.Queries; import org.elasticsearch.common.xcontent.XContentHelper; +import org.elasticsearch.index.query.AbstractQueryBuilder; import org.elasticsearch.xcontent.XContentParser; import org.elasticsearch.xcontent.XContentType; import org.elasticsearch.index.mapper.MappedFieldType; @@ -345,7 +346,7 @@ public Query parseRawQuery(final RawQuery rawQuery) throws SyntaxException { final XContentParser parser = XContentHelper.createParser(shardContext.getParserConfig(), new BytesArray(((StringRawQuery) rawQuery).getQueryString()), XContentType.JSON); - return SearchExecutionContext.parseInnerQueryBuilder(parser).toQuery(shardContext); + return AbstractQueryBuilder.parseTopLevelQuery(parser).toQuery(shardContext); } throw new IllegalArgumentException("Cannot handle RawQuery of type "+ rawQuery.getClass().getName()); diff --git a/src/main/java/querqy/elasticsearch/QuerqyPlugin.java b/src/main/java/querqy/elasticsearch/QuerqyPlugin.java index 198bfd4..c38a062 100644 --- a/src/main/java/querqy/elasticsearch/QuerqyPlugin.java +++ b/src/main/java/querqy/elasticsearch/QuerqyPlugin.java @@ -9,7 +9,7 @@ import org.elasticsearch.client.internal.Client; import org.elasticsearch.cluster.metadata.IndexNameExpressionResolver; import org.elasticsearch.cluster.node.DiscoveryNodes; -import org.elasticsearch.cluster.routing.allocation.decider.AllocationDeciders; +import org.elasticsearch.cluster.routing.allocation.AllocationService; import org.elasticsearch.cluster.service.ClusterService; import org.elasticsearch.common.io.stream.NamedWriteableRegistry; import org.elasticsearch.common.settings.ClusterSettings; @@ -115,7 +115,7 @@ public Collection createComponents(final Client client, final ClusterSer final NamedWriteableRegistry namedWriteableRegistry, final IndexNameExpressionResolver indexNameExpressionResolver, final Supplier repositoriesServiceSupplier, - final Tracer tracer, final AllocationDeciders allocationDeciders) { + final Tracer tracer, final AllocationService allocationService) { return Arrays.asList(rewriterShardContexts, querqyProcessor); } diff --git a/src/main/java/querqy/elasticsearch/query/QuerqyQueryBuilder.java b/src/main/java/querqy/elasticsearch/query/QuerqyQueryBuilder.java index efe5a02..4f42a88 100644 --- a/src/main/java/querqy/elasticsearch/query/QuerqyQueryBuilder.java +++ b/src/main/java/querqy/elasticsearch/query/QuerqyQueryBuilder.java @@ -5,7 +5,7 @@ import static querqy.elasticsearch.query.RequestUtils.paramToQueryFieldsAndBoosting; import org.apache.lucene.search.Query; -import org.elasticsearch.Version; +import org.elasticsearch.TransportVersion; import org.elasticsearch.xcontent.ParseField; import org.elasticsearch.common.ParsingException; import org.elasticsearch.common.io.stream.StreamInput; @@ -245,8 +245,8 @@ public String getWriteableName() { } @Override - public Version getMinimalSupportedVersion() { - return Version.V_7_12_1; // We added infoLogging at that point + public TransportVersion getMinimalSupportedVersion() { + return TransportVersion.V_7_13_0; // We added infoLogging at 7 12 1 } public void setQuerqyProcessor(final QuerqyProcessor querqyProcessor) { diff --git a/src/test/java/querqy/elasticsearch/RewriterShardContextsTest.java b/src/test/java/querqy/elasticsearch/RewriterShardContextsTest.java index 0d50cc4..f8aa83b 100644 --- a/src/test/java/querqy/elasticsearch/RewriterShardContextsTest.java +++ b/src/test/java/querqy/elasticsearch/RewriterShardContextsTest.java @@ -27,7 +27,6 @@ import java.util.Collections; import java.util.HashMap; import java.util.Map; -import java.util.Random; import java.util.concurrent.ExecutionException; @ESIntegTestCase.ClusterScope(scope = SUITE, supportsDedicatedMasters = false, numClientNodes = 1, numDataNodes = 2) @@ -152,13 +151,11 @@ public void index() { .get(); } - private static final Random RAND = new Random(); - /** * The first (= 0th) node provided by the test framework would just use the passed in QuerqyQueryBuilder object * so that the builder would not have its QuerqyProcessor set by the plugin. We always return a client of the * first node (instead of a random node) and query the other nodes via preferences which will generate a new - * QueryBuilder and allow to set set the QuerqyProcessor + * QueryBuilder and allow to set the QuerqyProcessor * * @return A client of node node_s0 */ diff --git a/src/test/java/querqy/elasticsearch/rewriterstore/NodesReloadRewriterResponseTest.java b/src/test/java/querqy/elasticsearch/rewriterstore/NodesReloadRewriterResponseTest.java index 80ea5d3..7a63ef8 100644 --- a/src/test/java/querqy/elasticsearch/rewriterstore/NodesReloadRewriterResponseTest.java +++ b/src/test/java/querqy/elasticsearch/rewriterstore/NodesReloadRewriterResponseTest.java @@ -18,6 +18,7 @@ import java.nio.ByteBuffer; import java.util.Arrays; import java.util.Collections; +import java.util.HashMap; public class NodesReloadRewriterResponseTest { @@ -33,12 +34,14 @@ public void testWriteToReadFromStream() throws IOException { new ClusterName("c1"), Arrays.asList( new NodesReloadRewriterResponse.NodeResponse( - new DiscoveryNode("n1", + new DiscoveryNode("n1", "n1", new TransportAddress(TransportAddress.META_ADDRESS, 9234), + Collections.emptyMap(), Collections.emptySet(), Version.CURRENT), npe), new NodesReloadRewriterResponse.NodeResponse( - new DiscoveryNode("n2", + new DiscoveryNode("n2", "n2", new TransportAddress(TransportAddress.META_ADDRESS, 9235), + Collections.emptyMap(), Collections.emptySet(), Version.CURRENT), null) ), Collections.singletonList(new FailedNodeException("n3", "node 3 down", From 0ab32f070df645898b5f9d4b7ef247632cbaa34f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rene=CC=81=20Kriegler?= Date: Tue, 13 Feb 2024 20:12:29 +0100 Subject: [PATCH 4/6] Updating Java version in plugin descriptor --- plugin-descriptor.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugin-descriptor.properties b/plugin-descriptor.properties index fb063ae..2c5e983 100644 --- a/plugin-descriptor.properties +++ b/plugin-descriptor.properties @@ -6,7 +6,7 @@ name=querqy classname=querqy.elasticsearch.QuerqyPlugin -java.version=1.8 +java.version=17 elasticsearch.version=${elasticsearch.version} From cb4e6e988b5e7bb8a6090a16cf148db9e18354f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rene=CC=81=20Kriegler?= Date: Tue, 13 Feb 2024 20:15:25 +0100 Subject: [PATCH 5/6] [maven-release-plugin] prepare release querqy-elasticsearch-1.7.es892.0 --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index 0e05db6..53badba 100644 --- a/pom.xml +++ b/pom.xml @@ -3,7 +3,7 @@ org.querqy querqy-elasticsearch - 1.7.es892.0-SNAPSHOT + 1.7.es892.0 jar @@ -34,7 +34,7 @@ git@github.com:querqy/querqy-elasticsearch.git scm:git:git@github.com:querqy/querqy-elasticsearch.git scm:git:git@github.com:querqy/querqy-elasticsearch.git - HEAD + querqy-elasticsearch-1.7.es892.0 From 60f8f3d3830b5089c584c51375ac3c79a858af86 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rene=CC=81=20Kriegler?= Date: Tue, 13 Feb 2024 20:15:29 +0100 Subject: [PATCH 6/6] [maven-release-plugin] prepare for next development iteration --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index 53badba..6c0b8ea 100644 --- a/pom.xml +++ b/pom.xml @@ -3,7 +3,7 @@ org.querqy querqy-elasticsearch - 1.7.es892.0 + 1.8.es892.0-SNAPSHOT jar @@ -34,7 +34,7 @@ git@github.com:querqy/querqy-elasticsearch.git scm:git:git@github.com:querqy/querqy-elasticsearch.git scm:git:git@github.com:querqy/querqy-elasticsearch.git - querqy-elasticsearch-1.7.es892.0 + HEAD