Skip to content

Commit

Permalink
Merge branch 'main' into dependabot/maven/org.jacoco-jacoco-maven-plu…
Browse files Browse the repository at this point in the history
…gin-0.8.10
  • Loading branch information
renekrie authored Mar 14, 2024
2 parents 8713b11 + 4f5befb commit 8ef7198
Show file tree
Hide file tree
Showing 8 changed files with 21 additions and 17 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
2 changes: 1 addition & 1 deletion plugin-descriptor.properties
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ name=querqy

classname=querqy.elasticsearch.QuerqyPlugin

java.version=1.8
java.version=17

elasticsearch.version=${elasticsearch.version}

Expand Down
10 changes: 6 additions & 4 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.8.es892.0-SNAPSHOT</version>
<packaging>jar</packaging>

<prerequisites>
Expand Down Expand Up @@ -40,9 +40,9 @@
<properties>

<maven-assembly-plugin.version>3.1.1</maven-assembly-plugin.version>
<maven-compiler-plugin.version>3.10.1</maven-compiler-plugin.version>
<maven-compiler-plugin.version>3.11.0</maven-compiler-plugin.version>
<maven-jar-plugin.version>3.1.2</maven-jar-plugin.version>
<maven-release-plugin.version>2.5.3</maven-release-plugin.version>
<maven-release-plugin.version>3.0.1</maven-release-plugin.version>
<maven-source-plugin.version>3.2.1</maven-source-plugin.version>
<maven-javadoc-plugin.version>3.4.1</maven-javadoc-plugin.version>
<maven-surefire-plugin.version>2.22.2</maven-surefire-plugin.version>
Expand All @@ -57,7 +57,8 @@
<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.10</jacoco.version>
<maven.compiler.source>16</maven.compiler.source>
<maven.compiler.target>16</maven.compiler.target>
Expand Down Expand Up @@ -132,6 +133,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 8ef7198

Please sign in to comment.