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/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} diff --git a/pom.xml b/pom.xml index f323918..0303529 100644 --- a/pom.xml +++ b/pom.xml @@ -3,7 +3,7 @@ org.querqy querqy-elasticsearch - 1.8.es853.0-SNAPSHOT + 1.8.es892.0-SNAPSHOT jar @@ -40,9 +40,9 @@ 3.1.1 - 3.10.1 + 3.11.0 3.1.2 - 2.5.3 + 3.0.1 3.2.1 3.4.1 2.22.2 @@ -57,7 +57,8 @@ 2.7.0 5.5.lucene900.1 - 8.5.3 + + 8.9.2 0.8.10 16 16 @@ -132,6 +133,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",