From 8b374b90bb00f30ccaeeda7735b727ab6cbf3ef0 Mon Sep 17 00:00:00 2001 From: fabriziofortino Date: Thu, 13 Apr 2023 17:51:19 +0200 Subject: [PATCH 1/4] OAK-10187: oak-search-elastic: update Java Client independently of HLRC --- oak-search-elastic/pom.xml | 11 ++++++----- .../query/async/ElasticResultRowAsyncIterator.java | 3 ++- .../oak/plugins/index/elastic/ElasticTestServer.java | 3 ++- 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/oak-search-elastic/pom.xml b/oak-search-elastic/pom.xml index 6e52bdc3b02..32396e6d029 100644 --- a/oak-search-elastic/pom.xml +++ b/oak-search-elastic/pom.xml @@ -33,7 +33,8 @@ Oak Elasticsearch integration subproject - 7.17.7 + 7.17.9 + 8.5.3 @@ -117,17 +118,17 @@ org.elasticsearch.client elasticsearch-rest-high-level-client - ${elasticsearch.version} + ${elasticsearch.hlrc.version} org.elasticsearch.client elasticsearch-rest-client - ${elasticsearch.version} + ${elasticsearch.hlrc.version} co.elastic.clients elasticsearch-java - ${elasticsearch.version} + ${elasticsearch.java.version} com.fasterxml.jackson.core @@ -137,7 +138,7 @@ org.elasticsearch elasticsearch - ${elasticsearch.version} + ${elasticsearch.hlrc.version} org.elasticsearch diff --git a/oak-search-elastic/src/main/java/org/apache/jackrabbit/oak/plugins/index/elastic/query/async/ElasticResultRowAsyncIterator.java b/oak-search-elastic/src/main/java/org/apache/jackrabbit/oak/plugins/index/elastic/query/async/ElasticResultRowAsyncIterator.java index 43ec0d30242..39c4f55de5c 100644 --- a/oak-search-elastic/src/main/java/org/apache/jackrabbit/oak/plugins/index/elastic/query/async/ElasticResultRowAsyncIterator.java +++ b/oak-search-elastic/src/main/java/org/apache/jackrabbit/oak/plugins/index/elastic/query/async/ElasticResultRowAsyncIterator.java @@ -16,6 +16,7 @@ */ package org.apache.jackrabbit.oak.plugins.index.elastic.query.async; +import co.elastic.clients.elasticsearch._types.FieldValue; import co.elastic.clients.elasticsearch._types.query_dsl.Query; import co.elastic.clients.elasticsearch._types.SortOptions; import co.elastic.clients.elasticsearch.core.SearchRequest; @@ -202,7 +203,7 @@ class ElasticQueryScanner { private long searchStartTime; // reference to the last document sort values for search_after queries - private List lastHitSortValues; + private List lastHitSortValues; // Semaphore to guarantee only one in-flight request to Elastic private final Semaphore semaphore = new Semaphore(1); diff --git a/oak-search-elastic/src/test/java/org/apache/jackrabbit/oak/plugins/index/elastic/ElasticTestServer.java b/oak-search-elastic/src/test/java/org/apache/jackrabbit/oak/plugins/index/elastic/ElasticTestServer.java index baf65a33bd1..63fbc20752a 100644 --- a/oak-search-elastic/src/test/java/org/apache/jackrabbit/oak/plugins/index/elastic/ElasticTestServer.java +++ b/oak-search-elastic/src/test/java/org/apache/jackrabbit/oak/plugins/index/elastic/ElasticTestServer.java @@ -49,7 +49,8 @@ public class ElasticTestServer implements AutoCloseable { "8.4.1.0", "56797a1bac6ceeaa36d2358f818b14633124d79c5e04630fa3544603d82eaa01", "8.4.2.0", "5ce81ad043816900a496ad5b3cce7de1d99547ebf92aa1f9856343e48580c71c", "8.4.3.0", "5c00d43cdd56c5c5d8e9032ad507acea482fb5ca9445861c5cc12ad63af66425", - "8.5.3.0", "d4c13f68650f9df5ff8c74ec83abc2e416de9c45f991d459326e0e2baf7b0e3f"); + "8.5.3.0", "d4c13f68650f9df5ff8c74ec83abc2e416de9c45f991d459326e0e2baf7b0e3f", + "8.7.0.0", "7aeac9b7ac4dea1ded3f8e477e26bcc7fe62e313edf6352f4bdf973c43d25819"); private static final ElasticTestServer SERVER = new ElasticTestServer(); private static volatile ElasticsearchContainer CONTAINER; From 2d8b0016884e57cd4f46e749fcb612e59e7bdcab Mon Sep 17 00:00:00 2001 From: Fabrizio Fortino Date: Fri, 14 Apr 2023 09:56:46 +0200 Subject: [PATCH 2/4] Update oak-search-elastic/pom.xml Co-authored-by: Mohit Kataria --- oak-search-elastic/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/oak-search-elastic/pom.xml b/oak-search-elastic/pom.xml index 32396e6d029..6bb8969f38a 100644 --- a/oak-search-elastic/pom.xml +++ b/oak-search-elastic/pom.xml @@ -34,7 +34,7 @@ 7.17.9 - 8.5.3 + 8.5.3 From c0c95f2a2fcd6c10acfbda5c201b05630ad0448b Mon Sep 17 00:00:00 2001 From: Fabrizio Fortino Date: Fri, 14 Apr 2023 09:56:53 +0200 Subject: [PATCH 3/4] Update oak-search-elastic/pom.xml Co-authored-by: Mohit Kataria --- oak-search-elastic/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/oak-search-elastic/pom.xml b/oak-search-elastic/pom.xml index 6bb8969f38a..85fb266a98c 100644 --- a/oak-search-elastic/pom.xml +++ b/oak-search-elastic/pom.xml @@ -128,7 +128,7 @@ co.elastic.clients elasticsearch-java - ${elasticsearch.java.version} + ${elasticsearch.java.client.version} com.fasterxml.jackson.core From ff031075cc3a514ea81dc2c358d4d702d0a0678b Mon Sep 17 00:00:00 2001 From: fabriziofortino Date: Fri, 14 Apr 2023 10:04:47 +0200 Subject: [PATCH 4/4] OAK-10187: use elasticsearch java client 8.7.0 --- oak-search-elastic/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/oak-search-elastic/pom.xml b/oak-search-elastic/pom.xml index 85fb266a98c..845ff6ad357 100644 --- a/oak-search-elastic/pom.xml +++ b/oak-search-elastic/pom.xml @@ -34,7 +34,7 @@ 7.17.9 - 8.5.3 + 8.7.0