Skip to content

Commit

Permalink
Version for ES 8.9.2
Browse files Browse the repository at this point in the history
  • Loading branch information
renekrie committed Feb 13, 2024
1 parent 56f3cca commit fd7c9ab
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 14 deletions.
1 change: 1 addition & 0 deletions assembly.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<assembly>
<id>querqy-elasticsearch-zip</id>
<formats>
<format>zip</format>
</formats>
Expand Down
5 changes: 3 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

<groupId>org.querqy</groupId>
<artifactId>querqy-elasticsearch</artifactId>
<version>1.8.es853.0-SNAPSHOT</version>
<version>1.7.es892.0-SNAPSHOT</version>
<packaging>jar</packaging>

<prerequisites>
Expand Down Expand Up @@ -57,7 +57,7 @@
<json-path.version>2.7.0</json-path.version>

<querqy.lucene.version>5.5.lucene900.1</querqy.lucene.version>
<elasticsearch.version>8.5.3</elasticsearch.version>
<elasticsearch.version>8.9.2</elasticsearch.version>
<jacoco.version>0.8.8</jacoco.version>
<maven.compiler.source>16</maven.compiler.source>
<maven.compiler.target>16</maven.compiler.target>
Expand Down Expand Up @@ -132,6 +132,7 @@
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<configuration>
<appendAssemblyId>false</appendAssemblyId>
<descriptors>
<descriptor>assembly.xml</descriptor>
</descriptors>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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());
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/querqy/elasticsearch/QuerqyPlugin.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -115,7 +115,7 @@ public Collection<Object> createComponents(final Client client, final ClusterSer
final NamedWriteableRegistry namedWriteableRegistry,
final IndexNameExpressionResolver indexNameExpressionResolver,
final Supplier<RepositoriesService> repositoriesServiceSupplier,
final Tracer tracer, final AllocationDeciders allocationDeciders) {
final Tracer tracer, final AllocationService allocationService) {
return Arrays.asList(rewriterShardContexts, querqyProcessor);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
import java.nio.ByteBuffer;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashMap;

public class NodesReloadRewriterResponseTest {

Expand All @@ -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",
Expand Down

0 comments on commit fd7c9ab

Please sign in to comment.