From b6212280571f9979b8374c72aab0751c8a4ef402 Mon Sep 17 00:00:00 2001 From: opensearch-ci-bot Date: Tue, 13 Dec 2022 21:49:39 +0000 Subject: [PATCH 1/6] Added bwc version 2.4.2 Signed-off-by: Daniel (dB.) Doubrovkine --- .ci/bwcVersions | 1 + 1 file changed, 1 insertion(+) diff --git a/.ci/bwcVersions b/.ci/bwcVersions index 65fd9e7281ad1..ebc6db6939bb0 100644 --- a/.ci/bwcVersions +++ b/.ci/bwcVersions @@ -11,4 +11,5 @@ BWC_VERSION: - "2.3.1" - "2.4.0" - "2.4.1" + - "2.4.2" - "2.5.0" From 52f771532849b84b925ad96ff5a9fdfe139c8bb5 Mon Sep 17 00:00:00 2001 From: "Daniel (dB.) Doubrovkine" Date: Tue, 13 Dec 2022 18:03:03 -0500 Subject: [PATCH 2/6] Added 2.4.2. Signed-off-by: Daniel (dB.) Doubrovkine --- server/src/main/java/org/opensearch/Version.java | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/server/src/main/java/org/opensearch/Version.java b/server/src/main/java/org/opensearch/Version.java index cef8ab1320342..0854cb978b4d0 100644 --- a/server/src/main/java/org/opensearch/Version.java +++ b/server/src/main/java/org/opensearch/Version.java @@ -83,16 +83,11 @@ public class Version implements Comparable, ToXContentFragment { public static final Version V_2_2_1 = new Version(2020199, org.apache.lucene.util.Version.LUCENE_9_3_0); public static final Version V_2_3_0 = new Version(2030099, org.apache.lucene.util.Version.LUCENE_9_3_0); public static final Version V_2_4_0 = new Version(2040099, org.apache.lucene.util.Version.LUCENE_9_4_1); + public static final Version V_2_4_1 = new Version(2040199, org.apache.lucene.util.Version.LUCENE_9_4_2); // UNRELEASED - public static final Version V_2_4_1 = new Version( - 2040199, - org.apache.lucene.util.Version.fromBits(9, 4, 2) /** needs updated 9.5.0 snapshots */ - ); - public static final Version V_2_5_0 = new Version( - 2050099, - org.apache.lucene.util.Version.fromBits(9, 4, 2) /** needs updated 9.5.0 snapshots */ - ); + public static final Version V_2_4_2 = new Version(2040299, org.apache.lucene.util.Version.LUCENE_9_4_2); + public static final Version V_2_5_0 = new Version(2050099, org.apache.lucene.util.Version.LUCENE_9_4_2); public static final Version V_3_0_0 = new Version(3000099, org.apache.lucene.util.Version.LUCENE_9_5_0); public static final Version CURRENT = V_3_0_0; From dab944222a7c28a1f7aa5d34d88cb8672a917480 Mon Sep 17 00:00:00 2001 From: Suraj Singh Date: Wed, 14 Dec 2022 11:13:03 -0800 Subject: [PATCH 3/6] Update Lucene snapshot to 9.5.0-snapshot-d5cef1c Signed-off-by: Suraj Singh --- CHANGELOG.md | 1 + buildSrc/version.properties | 2 +- .../licenses/lucene-expressions-9.5.0-snapshot-a4ef70f.jar.sha1 | 1 - .../licenses/lucene-expressions-9.5.0-snapshot-d5cef1c.jar.sha1 | 1 + .../lucene-analysis-icu-9.5.0-snapshot-a4ef70f.jar.sha1 | 1 - .../lucene-analysis-icu-9.5.0-snapshot-d5cef1c.jar.sha1 | 1 + .../lucene-analysis-kuromoji-9.5.0-snapshot-a4ef70f.jar.sha1 | 1 - .../lucene-analysis-kuromoji-9.5.0-snapshot-d5cef1c.jar.sha1 | 1 + .../lucene-analysis-nori-9.5.0-snapshot-a4ef70f.jar.sha1 | 1 - .../lucene-analysis-nori-9.5.0-snapshot-d5cef1c.jar.sha1 | 1 + .../lucene-analysis-phonetic-9.5.0-snapshot-a4ef70f.jar.sha1 | 1 - .../lucene-analysis-phonetic-9.5.0-snapshot-d5cef1c.jar.sha1 | 1 + .../lucene-analysis-smartcn-9.5.0-snapshot-a4ef70f.jar.sha1 | 1 - .../lucene-analysis-smartcn-9.5.0-snapshot-d5cef1c.jar.sha1 | 1 + .../lucene-analysis-stempel-9.5.0-snapshot-a4ef70f.jar.sha1 | 1 - .../lucene-analysis-stempel-9.5.0-snapshot-d5cef1c.jar.sha1 | 1 + .../lucene-analysis-morfologik-9.5.0-snapshot-a4ef70f.jar.sha1 | 1 - .../lucene-analysis-morfologik-9.5.0-snapshot-d5cef1c.jar.sha1 | 1 + .../lucene-analysis-common-9.5.0-snapshot-a4ef70f.jar.sha1 | 1 - .../lucene-analysis-common-9.5.0-snapshot-d5cef1c.jar.sha1 | 1 + .../lucene-backward-codecs-9.5.0-snapshot-a4ef70f.jar.sha1 | 1 - .../lucene-backward-codecs-9.5.0-snapshot-d5cef1c.jar.sha1 | 1 + server/licenses/lucene-core-9.5.0-snapshot-a4ef70f.jar.sha1 | 1 - server/licenses/lucene-core-9.5.0-snapshot-d5cef1c.jar.sha1 | 1 + server/licenses/lucene-grouping-9.5.0-snapshot-a4ef70f.jar.sha1 | 1 - server/licenses/lucene-grouping-9.5.0-snapshot-d5cef1c.jar.sha1 | 1 + .../licenses/lucene-highlighter-9.5.0-snapshot-a4ef70f.jar.sha1 | 1 - .../licenses/lucene-highlighter-9.5.0-snapshot-d5cef1c.jar.sha1 | 1 + server/licenses/lucene-join-9.5.0-snapshot-a4ef70f.jar.sha1 | 1 - server/licenses/lucene-join-9.5.0-snapshot-d5cef1c.jar.sha1 | 1 + server/licenses/lucene-memory-9.5.0-snapshot-a4ef70f.jar.sha1 | 1 - server/licenses/lucene-memory-9.5.0-snapshot-d5cef1c.jar.sha1 | 1 + server/licenses/lucene-misc-9.5.0-snapshot-a4ef70f.jar.sha1 | 1 - server/licenses/lucene-misc-9.5.0-snapshot-d5cef1c.jar.sha1 | 1 + server/licenses/lucene-queries-9.5.0-snapshot-a4ef70f.jar.sha1 | 1 - server/licenses/lucene-queries-9.5.0-snapshot-d5cef1c.jar.sha1 | 1 + .../licenses/lucene-queryparser-9.5.0-snapshot-a4ef70f.jar.sha1 | 1 - .../licenses/lucene-queryparser-9.5.0-snapshot-d5cef1c.jar.sha1 | 1 + server/licenses/lucene-sandbox-9.5.0-snapshot-a4ef70f.jar.sha1 | 1 - server/licenses/lucene-sandbox-9.5.0-snapshot-d5cef1c.jar.sha1 | 1 + .../lucene-spatial-extras-9.5.0-snapshot-a4ef70f.jar.sha1 | 1 - .../lucene-spatial-extras-9.5.0-snapshot-d5cef1c.jar.sha1 | 1 + .../licenses/lucene-spatial3d-9.5.0-snapshot-a4ef70f.jar.sha1 | 1 - .../licenses/lucene-spatial3d-9.5.0-snapshot-d5cef1c.jar.sha1 | 1 + server/licenses/lucene-suggest-9.5.0-snapshot-a4ef70f.jar.sha1 | 1 - server/licenses/lucene-suggest-9.5.0-snapshot-d5cef1c.jar.sha1 | 1 + 46 files changed, 24 insertions(+), 23 deletions(-) delete mode 100644 modules/lang-expression/licenses/lucene-expressions-9.5.0-snapshot-a4ef70f.jar.sha1 create mode 100644 modules/lang-expression/licenses/lucene-expressions-9.5.0-snapshot-d5cef1c.jar.sha1 delete mode 100644 plugins/analysis-icu/licenses/lucene-analysis-icu-9.5.0-snapshot-a4ef70f.jar.sha1 create mode 100644 plugins/analysis-icu/licenses/lucene-analysis-icu-9.5.0-snapshot-d5cef1c.jar.sha1 delete mode 100644 plugins/analysis-kuromoji/licenses/lucene-analysis-kuromoji-9.5.0-snapshot-a4ef70f.jar.sha1 create mode 100644 plugins/analysis-kuromoji/licenses/lucene-analysis-kuromoji-9.5.0-snapshot-d5cef1c.jar.sha1 delete mode 100644 plugins/analysis-nori/licenses/lucene-analysis-nori-9.5.0-snapshot-a4ef70f.jar.sha1 create mode 100644 plugins/analysis-nori/licenses/lucene-analysis-nori-9.5.0-snapshot-d5cef1c.jar.sha1 delete mode 100644 plugins/analysis-phonetic/licenses/lucene-analysis-phonetic-9.5.0-snapshot-a4ef70f.jar.sha1 create mode 100644 plugins/analysis-phonetic/licenses/lucene-analysis-phonetic-9.5.0-snapshot-d5cef1c.jar.sha1 delete mode 100644 plugins/analysis-smartcn/licenses/lucene-analysis-smartcn-9.5.0-snapshot-a4ef70f.jar.sha1 create mode 100644 plugins/analysis-smartcn/licenses/lucene-analysis-smartcn-9.5.0-snapshot-d5cef1c.jar.sha1 delete mode 100644 plugins/analysis-stempel/licenses/lucene-analysis-stempel-9.5.0-snapshot-a4ef70f.jar.sha1 create mode 100644 plugins/analysis-stempel/licenses/lucene-analysis-stempel-9.5.0-snapshot-d5cef1c.jar.sha1 delete mode 100644 plugins/analysis-ukrainian/licenses/lucene-analysis-morfologik-9.5.0-snapshot-a4ef70f.jar.sha1 create mode 100644 plugins/analysis-ukrainian/licenses/lucene-analysis-morfologik-9.5.0-snapshot-d5cef1c.jar.sha1 delete mode 100644 server/licenses/lucene-analysis-common-9.5.0-snapshot-a4ef70f.jar.sha1 create mode 100644 server/licenses/lucene-analysis-common-9.5.0-snapshot-d5cef1c.jar.sha1 delete mode 100644 server/licenses/lucene-backward-codecs-9.5.0-snapshot-a4ef70f.jar.sha1 create mode 100644 server/licenses/lucene-backward-codecs-9.5.0-snapshot-d5cef1c.jar.sha1 delete mode 100644 server/licenses/lucene-core-9.5.0-snapshot-a4ef70f.jar.sha1 create mode 100644 server/licenses/lucene-core-9.5.0-snapshot-d5cef1c.jar.sha1 delete mode 100644 server/licenses/lucene-grouping-9.5.0-snapshot-a4ef70f.jar.sha1 create mode 100644 server/licenses/lucene-grouping-9.5.0-snapshot-d5cef1c.jar.sha1 delete mode 100644 server/licenses/lucene-highlighter-9.5.0-snapshot-a4ef70f.jar.sha1 create mode 100644 server/licenses/lucene-highlighter-9.5.0-snapshot-d5cef1c.jar.sha1 delete mode 100644 server/licenses/lucene-join-9.5.0-snapshot-a4ef70f.jar.sha1 create mode 100644 server/licenses/lucene-join-9.5.0-snapshot-d5cef1c.jar.sha1 delete mode 100644 server/licenses/lucene-memory-9.5.0-snapshot-a4ef70f.jar.sha1 create mode 100644 server/licenses/lucene-memory-9.5.0-snapshot-d5cef1c.jar.sha1 delete mode 100644 server/licenses/lucene-misc-9.5.0-snapshot-a4ef70f.jar.sha1 create mode 100644 server/licenses/lucene-misc-9.5.0-snapshot-d5cef1c.jar.sha1 delete mode 100644 server/licenses/lucene-queries-9.5.0-snapshot-a4ef70f.jar.sha1 create mode 100644 server/licenses/lucene-queries-9.5.0-snapshot-d5cef1c.jar.sha1 delete mode 100644 server/licenses/lucene-queryparser-9.5.0-snapshot-a4ef70f.jar.sha1 create mode 100644 server/licenses/lucene-queryparser-9.5.0-snapshot-d5cef1c.jar.sha1 delete mode 100644 server/licenses/lucene-sandbox-9.5.0-snapshot-a4ef70f.jar.sha1 create mode 100644 server/licenses/lucene-sandbox-9.5.0-snapshot-d5cef1c.jar.sha1 delete mode 100644 server/licenses/lucene-spatial-extras-9.5.0-snapshot-a4ef70f.jar.sha1 create mode 100644 server/licenses/lucene-spatial-extras-9.5.0-snapshot-d5cef1c.jar.sha1 delete mode 100644 server/licenses/lucene-spatial3d-9.5.0-snapshot-a4ef70f.jar.sha1 create mode 100644 server/licenses/lucene-spatial3d-9.5.0-snapshot-d5cef1c.jar.sha1 delete mode 100644 server/licenses/lucene-suggest-9.5.0-snapshot-a4ef70f.jar.sha1 create mode 100644 server/licenses/lucene-suggest-9.5.0-snapshot-d5cef1c.jar.sha1 diff --git a/CHANGELOG.md b/CHANGELOG.md index b29a0526a6ffc..5fbc11fe2644c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -51,6 +51,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), - Bumps `protobuf-java` from 3.21.7 to 3.21.9 ([#5319](https://github.com/opensearch-project/OpenSearch/pull/5319)) - Update Apache Lucene to 9.5.0-snapshot-a4ef70f ([#4979](https://github.com/opensearch-project/OpenSearch/pull/4979)) - Update to Gradle 7.6 and JDK-19 ([#4973](https://github.com/opensearch-project/OpenSearch/pull/4973)) +- Update Apache Lucene to 9.5.0-snapshot-d5cef1c ([#4979](https://github.com/opensearch-project/OpenSearch/pull/4979)) ### Changed - [CCR] Add getHistoryOperationsFromTranslog method to fetch the history snapshot from translogs ([#3948](https://github.com/opensearch-project/OpenSearch/pull/3948)) diff --git a/buildSrc/version.properties b/buildSrc/version.properties index 03a16bf002717..3d733b34f97fc 100644 --- a/buildSrc/version.properties +++ b/buildSrc/version.properties @@ -1,5 +1,5 @@ opensearch = 3.0.0 -lucene = 9.5.0-snapshot-a4ef70f +lucene = 9.5.0-snapshot-d5cef1c bundled_jdk_vendor = adoptium bundled_jdk = 19.0.1+10 diff --git a/modules/lang-expression/licenses/lucene-expressions-9.5.0-snapshot-a4ef70f.jar.sha1 b/modules/lang-expression/licenses/lucene-expressions-9.5.0-snapshot-a4ef70f.jar.sha1 deleted file mode 100644 index 0e1f3e37f508a..0000000000000 --- a/modules/lang-expression/licenses/lucene-expressions-9.5.0-snapshot-a4ef70f.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -c92a0928724b04224157ce2d3e105953f57f94db \ No newline at end of file diff --git a/modules/lang-expression/licenses/lucene-expressions-9.5.0-snapshot-d5cef1c.jar.sha1 b/modules/lang-expression/licenses/lucene-expressions-9.5.0-snapshot-d5cef1c.jar.sha1 new file mode 100644 index 0000000000000..16409bfd2404c --- /dev/null +++ b/modules/lang-expression/licenses/lucene-expressions-9.5.0-snapshot-d5cef1c.jar.sha1 @@ -0,0 +1 @@ +afe877ebf5ec4be7d17636b695015c449a523a3b \ No newline at end of file diff --git a/plugins/analysis-icu/licenses/lucene-analysis-icu-9.5.0-snapshot-a4ef70f.jar.sha1 b/plugins/analysis-icu/licenses/lucene-analysis-icu-9.5.0-snapshot-a4ef70f.jar.sha1 deleted file mode 100644 index a49a0749a9e4a..0000000000000 --- a/plugins/analysis-icu/licenses/lucene-analysis-icu-9.5.0-snapshot-a4ef70f.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -a7c38619d8f2cc48f792e007aa25b430f4f25698 \ No newline at end of file diff --git a/plugins/analysis-icu/licenses/lucene-analysis-icu-9.5.0-snapshot-d5cef1c.jar.sha1 b/plugins/analysis-icu/licenses/lucene-analysis-icu-9.5.0-snapshot-d5cef1c.jar.sha1 new file mode 100644 index 0000000000000..0e7abb03dc38d --- /dev/null +++ b/plugins/analysis-icu/licenses/lucene-analysis-icu-9.5.0-snapshot-d5cef1c.jar.sha1 @@ -0,0 +1 @@ +670d8f48ea9cba542e263d3ec6c3e2a33accc561 \ No newline at end of file diff --git a/plugins/analysis-kuromoji/licenses/lucene-analysis-kuromoji-9.5.0-snapshot-a4ef70f.jar.sha1 b/plugins/analysis-kuromoji/licenses/lucene-analysis-kuromoji-9.5.0-snapshot-a4ef70f.jar.sha1 deleted file mode 100644 index 709bcf84faf06..0000000000000 --- a/plugins/analysis-kuromoji/licenses/lucene-analysis-kuromoji-9.5.0-snapshot-a4ef70f.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -6243383e5fbcf87551ded4c1b48b69a4276bb748 \ No newline at end of file diff --git a/plugins/analysis-kuromoji/licenses/lucene-analysis-kuromoji-9.5.0-snapshot-d5cef1c.jar.sha1 b/plugins/analysis-kuromoji/licenses/lucene-analysis-kuromoji-9.5.0-snapshot-d5cef1c.jar.sha1 new file mode 100644 index 0000000000000..f9bf4c20a1119 --- /dev/null +++ b/plugins/analysis-kuromoji/licenses/lucene-analysis-kuromoji-9.5.0-snapshot-d5cef1c.jar.sha1 @@ -0,0 +1 @@ +b1f42bad26470c8ef88096e0c8564a74223c52c9 \ No newline at end of file diff --git a/plugins/analysis-nori/licenses/lucene-analysis-nori-9.5.0-snapshot-a4ef70f.jar.sha1 b/plugins/analysis-nori/licenses/lucene-analysis-nori-9.5.0-snapshot-a4ef70f.jar.sha1 deleted file mode 100644 index 0c4d7b7a2755c..0000000000000 --- a/plugins/analysis-nori/licenses/lucene-analysis-nori-9.5.0-snapshot-a4ef70f.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -91d1560bc927f1a431bb92e47fda9395d3b3e551 \ No newline at end of file diff --git a/plugins/analysis-nori/licenses/lucene-analysis-nori-9.5.0-snapshot-d5cef1c.jar.sha1 b/plugins/analysis-nori/licenses/lucene-analysis-nori-9.5.0-snapshot-d5cef1c.jar.sha1 new file mode 100644 index 0000000000000..3d0efa0aa878b --- /dev/null +++ b/plugins/analysis-nori/licenses/lucene-analysis-nori-9.5.0-snapshot-d5cef1c.jar.sha1 @@ -0,0 +1 @@ +f3cf74fa91da5133667f8916f93071fed231f2ee \ No newline at end of file diff --git a/plugins/analysis-phonetic/licenses/lucene-analysis-phonetic-9.5.0-snapshot-a4ef70f.jar.sha1 b/plugins/analysis-phonetic/licenses/lucene-analysis-phonetic-9.5.0-snapshot-a4ef70f.jar.sha1 deleted file mode 100644 index 82524cbdb4ada..0000000000000 --- a/plugins/analysis-phonetic/licenses/lucene-analysis-phonetic-9.5.0-snapshot-a4ef70f.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -26bbfd1a796d62006dff9c7e32d31a0397a8025e \ No newline at end of file diff --git a/plugins/analysis-phonetic/licenses/lucene-analysis-phonetic-9.5.0-snapshot-d5cef1c.jar.sha1 b/plugins/analysis-phonetic/licenses/lucene-analysis-phonetic-9.5.0-snapshot-d5cef1c.jar.sha1 new file mode 100644 index 0000000000000..10e6d36daebd1 --- /dev/null +++ b/plugins/analysis-phonetic/licenses/lucene-analysis-phonetic-9.5.0-snapshot-d5cef1c.jar.sha1 @@ -0,0 +1 @@ +e633c2d0cd677e4f1cef5aadc6bdc65e8e898d98 \ No newline at end of file diff --git a/plugins/analysis-smartcn/licenses/lucene-analysis-smartcn-9.5.0-snapshot-a4ef70f.jar.sha1 b/plugins/analysis-smartcn/licenses/lucene-analysis-smartcn-9.5.0-snapshot-a4ef70f.jar.sha1 deleted file mode 100644 index af6b600d22090..0000000000000 --- a/plugins/analysis-smartcn/licenses/lucene-analysis-smartcn-9.5.0-snapshot-a4ef70f.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -a1a26c04e24d9a8573e6bd9a0bacad184821dd33 \ No newline at end of file diff --git a/plugins/analysis-smartcn/licenses/lucene-analysis-smartcn-9.5.0-snapshot-d5cef1c.jar.sha1 b/plugins/analysis-smartcn/licenses/lucene-analysis-smartcn-9.5.0-snapshot-d5cef1c.jar.sha1 new file mode 100644 index 0000000000000..ea35d7f71329c --- /dev/null +++ b/plugins/analysis-smartcn/licenses/lucene-analysis-smartcn-9.5.0-snapshot-d5cef1c.jar.sha1 @@ -0,0 +1 @@ +c12a2943e6f4977f15d489ac3e9802c5dfb3c4cc \ No newline at end of file diff --git a/plugins/analysis-stempel/licenses/lucene-analysis-stempel-9.5.0-snapshot-a4ef70f.jar.sha1 b/plugins/analysis-stempel/licenses/lucene-analysis-stempel-9.5.0-snapshot-a4ef70f.jar.sha1 deleted file mode 100644 index ea5680869c187..0000000000000 --- a/plugins/analysis-stempel/licenses/lucene-analysis-stempel-9.5.0-snapshot-a4ef70f.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -19aa9eff0e0671fd91eb435a2e2fa29dec52cf5c \ No newline at end of file diff --git a/plugins/analysis-stempel/licenses/lucene-analysis-stempel-9.5.0-snapshot-d5cef1c.jar.sha1 b/plugins/analysis-stempel/licenses/lucene-analysis-stempel-9.5.0-snapshot-d5cef1c.jar.sha1 new file mode 100644 index 0000000000000..652c406f21009 --- /dev/null +++ b/plugins/analysis-stempel/licenses/lucene-analysis-stempel-9.5.0-snapshot-d5cef1c.jar.sha1 @@ -0,0 +1 @@ +5d257928a34e586a7de9fc7d4a013868f7a1db74 \ No newline at end of file diff --git a/plugins/analysis-ukrainian/licenses/lucene-analysis-morfologik-9.5.0-snapshot-a4ef70f.jar.sha1 b/plugins/analysis-ukrainian/licenses/lucene-analysis-morfologik-9.5.0-snapshot-a4ef70f.jar.sha1 deleted file mode 100644 index 4f81941a1746e..0000000000000 --- a/plugins/analysis-ukrainian/licenses/lucene-analysis-morfologik-9.5.0-snapshot-a4ef70f.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -05ff979dfe3ded901ccd72d5a5d66349286c44bf \ No newline at end of file diff --git a/plugins/analysis-ukrainian/licenses/lucene-analysis-morfologik-9.5.0-snapshot-d5cef1c.jar.sha1 b/plugins/analysis-ukrainian/licenses/lucene-analysis-morfologik-9.5.0-snapshot-d5cef1c.jar.sha1 new file mode 100644 index 0000000000000..2fd10c33dcd80 --- /dev/null +++ b/plugins/analysis-ukrainian/licenses/lucene-analysis-morfologik-9.5.0-snapshot-d5cef1c.jar.sha1 @@ -0,0 +1 @@ +3d88f80ad07421b9470cb44a6f5b67dd47047b13 \ No newline at end of file diff --git a/server/licenses/lucene-analysis-common-9.5.0-snapshot-a4ef70f.jar.sha1 b/server/licenses/lucene-analysis-common-9.5.0-snapshot-a4ef70f.jar.sha1 deleted file mode 100644 index e12c20e2a64b8..0000000000000 --- a/server/licenses/lucene-analysis-common-9.5.0-snapshot-a4ef70f.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -84d717ed509f8ce484c57fea720d8de2a6afdaa6 \ No newline at end of file diff --git a/server/licenses/lucene-analysis-common-9.5.0-snapshot-d5cef1c.jar.sha1 b/server/licenses/lucene-analysis-common-9.5.0-snapshot-d5cef1c.jar.sha1 new file mode 100644 index 0000000000000..bf375b397e5eb --- /dev/null +++ b/server/licenses/lucene-analysis-common-9.5.0-snapshot-d5cef1c.jar.sha1 @@ -0,0 +1 @@ +f2440fe126dad78e95f901c0f7a6eeb66da09938 \ No newline at end of file diff --git a/server/licenses/lucene-backward-codecs-9.5.0-snapshot-a4ef70f.jar.sha1 b/server/licenses/lucene-backward-codecs-9.5.0-snapshot-a4ef70f.jar.sha1 deleted file mode 100644 index e78e165acddb3..0000000000000 --- a/server/licenses/lucene-backward-codecs-9.5.0-snapshot-a4ef70f.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -087bcc11526f8dcc56742dd8188bd05ad0329161 \ No newline at end of file diff --git a/server/licenses/lucene-backward-codecs-9.5.0-snapshot-d5cef1c.jar.sha1 b/server/licenses/lucene-backward-codecs-9.5.0-snapshot-d5cef1c.jar.sha1 new file mode 100644 index 0000000000000..112438e4c262d --- /dev/null +++ b/server/licenses/lucene-backward-codecs-9.5.0-snapshot-d5cef1c.jar.sha1 @@ -0,0 +1 @@ +51677b84f823e352ab366f6a6bf87de8816650c4 \ No newline at end of file diff --git a/server/licenses/lucene-core-9.5.0-snapshot-a4ef70f.jar.sha1 b/server/licenses/lucene-core-9.5.0-snapshot-a4ef70f.jar.sha1 deleted file mode 100644 index bd5fc52fb86c3..0000000000000 --- a/server/licenses/lucene-core-9.5.0-snapshot-a4ef70f.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -e949897fa24e14d2701a3c41fe27a4f094681b81 \ No newline at end of file diff --git a/server/licenses/lucene-core-9.5.0-snapshot-d5cef1c.jar.sha1 b/server/licenses/lucene-core-9.5.0-snapshot-d5cef1c.jar.sha1 new file mode 100644 index 0000000000000..7523ee5a94ca9 --- /dev/null +++ b/server/licenses/lucene-core-9.5.0-snapshot-d5cef1c.jar.sha1 @@ -0,0 +1 @@ +b11b5c54ab26152c0db003c7a514f4e6c6825fdd \ No newline at end of file diff --git a/server/licenses/lucene-grouping-9.5.0-snapshot-a4ef70f.jar.sha1 b/server/licenses/lucene-grouping-9.5.0-snapshot-a4ef70f.jar.sha1 deleted file mode 100644 index 17aa27ceac3bf..0000000000000 --- a/server/licenses/lucene-grouping-9.5.0-snapshot-a4ef70f.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -6cb53ca55f7e313ed19852ae37fca4ad2e4caa0c \ No newline at end of file diff --git a/server/licenses/lucene-grouping-9.5.0-snapshot-d5cef1c.jar.sha1 b/server/licenses/lucene-grouping-9.5.0-snapshot-d5cef1c.jar.sha1 new file mode 100644 index 0000000000000..d0c7504f554fd --- /dev/null +++ b/server/licenses/lucene-grouping-9.5.0-snapshot-d5cef1c.jar.sha1 @@ -0,0 +1 @@ +58bd60d4c3ec753eef0d904601ab6d726633a8db \ No newline at end of file diff --git a/server/licenses/lucene-highlighter-9.5.0-snapshot-a4ef70f.jar.sha1 b/server/licenses/lucene-highlighter-9.5.0-snapshot-a4ef70f.jar.sha1 deleted file mode 100644 index 7f248580a6a49..0000000000000 --- a/server/licenses/lucene-highlighter-9.5.0-snapshot-a4ef70f.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -c7f650e33ac11e01bb5c2e35e4eb080a9ce245b8 \ No newline at end of file diff --git a/server/licenses/lucene-highlighter-9.5.0-snapshot-d5cef1c.jar.sha1 b/server/licenses/lucene-highlighter-9.5.0-snapshot-d5cef1c.jar.sha1 new file mode 100644 index 0000000000000..9a26b338bdab6 --- /dev/null +++ b/server/licenses/lucene-highlighter-9.5.0-snapshot-d5cef1c.jar.sha1 @@ -0,0 +1 @@ +97f11221b89e37c575ed9538d88b1529872abd80 \ No newline at end of file diff --git a/server/licenses/lucene-join-9.5.0-snapshot-a4ef70f.jar.sha1 b/server/licenses/lucene-join-9.5.0-snapshot-a4ef70f.jar.sha1 deleted file mode 100644 index 88fef91bee929..0000000000000 --- a/server/licenses/lucene-join-9.5.0-snapshot-a4ef70f.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -914ea03f71043a9291623628396a97a4c1901f8c \ No newline at end of file diff --git a/server/licenses/lucene-join-9.5.0-snapshot-d5cef1c.jar.sha1 b/server/licenses/lucene-join-9.5.0-snapshot-d5cef1c.jar.sha1 new file mode 100644 index 0000000000000..09459e5aafe3f --- /dev/null +++ b/server/licenses/lucene-join-9.5.0-snapshot-d5cef1c.jar.sha1 @@ -0,0 +1 @@ +84980688c8eb9fbdb597a4291713ee630653392d \ No newline at end of file diff --git a/server/licenses/lucene-memory-9.5.0-snapshot-a4ef70f.jar.sha1 b/server/licenses/lucene-memory-9.5.0-snapshot-a4ef70f.jar.sha1 deleted file mode 100644 index f6422c2e72fda..0000000000000 --- a/server/licenses/lucene-memory-9.5.0-snapshot-a4ef70f.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -e83ecf8c4f5991f8e4ea319fc9194c933e02f66d \ No newline at end of file diff --git a/server/licenses/lucene-memory-9.5.0-snapshot-d5cef1c.jar.sha1 b/server/licenses/lucene-memory-9.5.0-snapshot-d5cef1c.jar.sha1 new file mode 100644 index 0000000000000..e5b9ceae7e187 --- /dev/null +++ b/server/licenses/lucene-memory-9.5.0-snapshot-d5cef1c.jar.sha1 @@ -0,0 +1 @@ +23d3d1eefec90950b34ddef988be21b8fdfeb415 \ No newline at end of file diff --git a/server/licenses/lucene-misc-9.5.0-snapshot-a4ef70f.jar.sha1 b/server/licenses/lucene-misc-9.5.0-snapshot-a4ef70f.jar.sha1 deleted file mode 100644 index 262190789814d..0000000000000 --- a/server/licenses/lucene-misc-9.5.0-snapshot-a4ef70f.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -5adc5753c741847cd84cb11ebfcd613bedc11beb \ No newline at end of file diff --git a/server/licenses/lucene-misc-9.5.0-snapshot-d5cef1c.jar.sha1 b/server/licenses/lucene-misc-9.5.0-snapshot-d5cef1c.jar.sha1 new file mode 100644 index 0000000000000..bf7c5edf32b62 --- /dev/null +++ b/server/licenses/lucene-misc-9.5.0-snapshot-d5cef1c.jar.sha1 @@ -0,0 +1 @@ +e5f164991c11efeebf0697c76ffbe986af5341d5 \ No newline at end of file diff --git a/server/licenses/lucene-queries-9.5.0-snapshot-a4ef70f.jar.sha1 b/server/licenses/lucene-queries-9.5.0-snapshot-a4ef70f.jar.sha1 deleted file mode 100644 index f8bba3d90a0f1..0000000000000 --- a/server/licenses/lucene-queries-9.5.0-snapshot-a4ef70f.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -824272a064aa2fff1f952b5ae383e80aef4e45f8 \ No newline at end of file diff --git a/server/licenses/lucene-queries-9.5.0-snapshot-d5cef1c.jar.sha1 b/server/licenses/lucene-queries-9.5.0-snapshot-d5cef1c.jar.sha1 new file mode 100644 index 0000000000000..d8d8cb121bcd4 --- /dev/null +++ b/server/licenses/lucene-queries-9.5.0-snapshot-d5cef1c.jar.sha1 @@ -0,0 +1 @@ +8c382224253727794557200e97717b927ad8fa74 \ No newline at end of file diff --git a/server/licenses/lucene-queryparser-9.5.0-snapshot-a4ef70f.jar.sha1 b/server/licenses/lucene-queryparser-9.5.0-snapshot-a4ef70f.jar.sha1 deleted file mode 100644 index 652ccd298c9d9..0000000000000 --- a/server/licenses/lucene-queryparser-9.5.0-snapshot-a4ef70f.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -d5bf983dfb6183b390bdc9d3b41b88b6ee6f780e \ No newline at end of file diff --git a/server/licenses/lucene-queryparser-9.5.0-snapshot-d5cef1c.jar.sha1 b/server/licenses/lucene-queryparser-9.5.0-snapshot-d5cef1c.jar.sha1 new file mode 100644 index 0000000000000..649651e62c018 --- /dev/null +++ b/server/licenses/lucene-queryparser-9.5.0-snapshot-d5cef1c.jar.sha1 @@ -0,0 +1 @@ +18cb84b504b8a57075efca72f4701aa8a720a057 \ No newline at end of file diff --git a/server/licenses/lucene-sandbox-9.5.0-snapshot-a4ef70f.jar.sha1 b/server/licenses/lucene-sandbox-9.5.0-snapshot-a4ef70f.jar.sha1 deleted file mode 100644 index b51328d19065a..0000000000000 --- a/server/licenses/lucene-sandbox-9.5.0-snapshot-a4ef70f.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -fff58cc6b79887348b45c9d06bff39d055540738 \ No newline at end of file diff --git a/server/licenses/lucene-sandbox-9.5.0-snapshot-d5cef1c.jar.sha1 b/server/licenses/lucene-sandbox-9.5.0-snapshot-d5cef1c.jar.sha1 new file mode 100644 index 0000000000000..a1ef08b0a4069 --- /dev/null +++ b/server/licenses/lucene-sandbox-9.5.0-snapshot-d5cef1c.jar.sha1 @@ -0,0 +1 @@ +76cc7f77a30864e853a6662a5b7f4937023bd5e6 \ No newline at end of file diff --git a/server/licenses/lucene-spatial-extras-9.5.0-snapshot-a4ef70f.jar.sha1 b/server/licenses/lucene-spatial-extras-9.5.0-snapshot-a4ef70f.jar.sha1 deleted file mode 100644 index 37a22d637a051..0000000000000 --- a/server/licenses/lucene-spatial-extras-9.5.0-snapshot-a4ef70f.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -c391f1df56d63dff3c6543da15c87105f2106c86 \ No newline at end of file diff --git a/server/licenses/lucene-spatial-extras-9.5.0-snapshot-d5cef1c.jar.sha1 b/server/licenses/lucene-spatial-extras-9.5.0-snapshot-d5cef1c.jar.sha1 new file mode 100644 index 0000000000000..3810d15fdf5c9 --- /dev/null +++ b/server/licenses/lucene-spatial-extras-9.5.0-snapshot-d5cef1c.jar.sha1 @@ -0,0 +1 @@ +70df807e8504f2fb1fe28ceaf33373e3de51aec8 \ No newline at end of file diff --git a/server/licenses/lucene-spatial3d-9.5.0-snapshot-a4ef70f.jar.sha1 b/server/licenses/lucene-spatial3d-9.5.0-snapshot-a4ef70f.jar.sha1 deleted file mode 100644 index b0c9924752852..0000000000000 --- a/server/licenses/lucene-spatial3d-9.5.0-snapshot-a4ef70f.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -794109c75534b1c3a19a29bcb66692f0e0708744 \ No newline at end of file diff --git a/server/licenses/lucene-spatial3d-9.5.0-snapshot-d5cef1c.jar.sha1 b/server/licenses/lucene-spatial3d-9.5.0-snapshot-d5cef1c.jar.sha1 new file mode 100644 index 0000000000000..6b0ad3693733d --- /dev/null +++ b/server/licenses/lucene-spatial3d-9.5.0-snapshot-d5cef1c.jar.sha1 @@ -0,0 +1 @@ +75aaac030d36ddf7cdb09632fe1293c6ecd756ce \ No newline at end of file diff --git a/server/licenses/lucene-suggest-9.5.0-snapshot-a4ef70f.jar.sha1 b/server/licenses/lucene-suggest-9.5.0-snapshot-a4ef70f.jar.sha1 deleted file mode 100644 index 63f5d8123c2cf..0000000000000 --- a/server/licenses/lucene-suggest-9.5.0-snapshot-a4ef70f.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -dc5fdd92541f4e78256152d3efc11bdb67ffdc91 \ No newline at end of file diff --git a/server/licenses/lucene-suggest-9.5.0-snapshot-d5cef1c.jar.sha1 b/server/licenses/lucene-suggest-9.5.0-snapshot-d5cef1c.jar.sha1 new file mode 100644 index 0000000000000..d3b116f990627 --- /dev/null +++ b/server/licenses/lucene-suggest-9.5.0-snapshot-d5cef1c.jar.sha1 @@ -0,0 +1 @@ +384e589a3d90773ff47ffbaa2797afe95609f183 \ No newline at end of file From 9d730b63d7ead2319e9671721c240fcbb886370a Mon Sep 17 00:00:00 2001 From: Suraj Singh Date: Wed, 14 Dec 2022 11:16:17 -0800 Subject: [PATCH 4/6] Update changelog entry Signed-off-by: Suraj Singh --- .ci/bwcVersions | 1 - CHANGELOG.md | 2 +- server/src/main/java/org/opensearch/Version.java | 11 ++++++++--- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/.ci/bwcVersions b/.ci/bwcVersions index ebc6db6939bb0..65fd9e7281ad1 100644 --- a/.ci/bwcVersions +++ b/.ci/bwcVersions @@ -11,5 +11,4 @@ BWC_VERSION: - "2.3.1" - "2.4.0" - "2.4.1" - - "2.4.2" - "2.5.0" diff --git a/CHANGELOG.md b/CHANGELOG.md index 5fbc11fe2644c..078be0391dfdc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -51,7 +51,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), - Bumps `protobuf-java` from 3.21.7 to 3.21.9 ([#5319](https://github.com/opensearch-project/OpenSearch/pull/5319)) - Update Apache Lucene to 9.5.0-snapshot-a4ef70f ([#4979](https://github.com/opensearch-project/OpenSearch/pull/4979)) - Update to Gradle 7.6 and JDK-19 ([#4973](https://github.com/opensearch-project/OpenSearch/pull/4973)) -- Update Apache Lucene to 9.5.0-snapshot-d5cef1c ([#4979](https://github.com/opensearch-project/OpenSearch/pull/4979)) +- Update Apache Lucene to 9.5.0-snapshot-d5cef1c ([#5570](https://github.com/opensearch-project/OpenSearch/pull/5570)) ### Changed - [CCR] Add getHistoryOperationsFromTranslog method to fetch the history snapshot from translogs ([#3948](https://github.com/opensearch-project/OpenSearch/pull/3948)) diff --git a/server/src/main/java/org/opensearch/Version.java b/server/src/main/java/org/opensearch/Version.java index 0854cb978b4d0..cef8ab1320342 100644 --- a/server/src/main/java/org/opensearch/Version.java +++ b/server/src/main/java/org/opensearch/Version.java @@ -83,11 +83,16 @@ public class Version implements Comparable, ToXContentFragment { public static final Version V_2_2_1 = new Version(2020199, org.apache.lucene.util.Version.LUCENE_9_3_0); public static final Version V_2_3_0 = new Version(2030099, org.apache.lucene.util.Version.LUCENE_9_3_0); public static final Version V_2_4_0 = new Version(2040099, org.apache.lucene.util.Version.LUCENE_9_4_1); - public static final Version V_2_4_1 = new Version(2040199, org.apache.lucene.util.Version.LUCENE_9_4_2); // UNRELEASED - public static final Version V_2_4_2 = new Version(2040299, org.apache.lucene.util.Version.LUCENE_9_4_2); - public static final Version V_2_5_0 = new Version(2050099, org.apache.lucene.util.Version.LUCENE_9_4_2); + public static final Version V_2_4_1 = new Version( + 2040199, + org.apache.lucene.util.Version.fromBits(9, 4, 2) /** needs updated 9.5.0 snapshots */ + ); + public static final Version V_2_5_0 = new Version( + 2050099, + org.apache.lucene.util.Version.fromBits(9, 4, 2) /** needs updated 9.5.0 snapshots */ + ); public static final Version V_3_0_0 = new Version(3000099, org.apache.lucene.util.Version.LUCENE_9_5_0); public static final Version CURRENT = V_3_0_0; From 031e905dda6996a5d586549ce47aa52323544165 Mon Sep 17 00:00:00 2001 From: Suraj Singh Date: Wed, 14 Dec 2022 11:42:32 -0800 Subject: [PATCH 5/6] Add 2.4.2 bwc version Signed-off-by: Suraj Singh --- .ci/bwcVersions | 1 + server/src/main/java/org/opensearch/Version.java | 11 +++-------- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/.ci/bwcVersions b/.ci/bwcVersions index 65fd9e7281ad1..ebc6db6939bb0 100644 --- a/.ci/bwcVersions +++ b/.ci/bwcVersions @@ -11,4 +11,5 @@ BWC_VERSION: - "2.3.1" - "2.4.0" - "2.4.1" + - "2.4.2" - "2.5.0" diff --git a/server/src/main/java/org/opensearch/Version.java b/server/src/main/java/org/opensearch/Version.java index cef8ab1320342..0854cb978b4d0 100644 --- a/server/src/main/java/org/opensearch/Version.java +++ b/server/src/main/java/org/opensearch/Version.java @@ -83,16 +83,11 @@ public class Version implements Comparable, ToXContentFragment { public static final Version V_2_2_1 = new Version(2020199, org.apache.lucene.util.Version.LUCENE_9_3_0); public static final Version V_2_3_0 = new Version(2030099, org.apache.lucene.util.Version.LUCENE_9_3_0); public static final Version V_2_4_0 = new Version(2040099, org.apache.lucene.util.Version.LUCENE_9_4_1); + public static final Version V_2_4_1 = new Version(2040199, org.apache.lucene.util.Version.LUCENE_9_4_2); // UNRELEASED - public static final Version V_2_4_1 = new Version( - 2040199, - org.apache.lucene.util.Version.fromBits(9, 4, 2) /** needs updated 9.5.0 snapshots */ - ); - public static final Version V_2_5_0 = new Version( - 2050099, - org.apache.lucene.util.Version.fromBits(9, 4, 2) /** needs updated 9.5.0 snapshots */ - ); + public static final Version V_2_4_2 = new Version(2040299, org.apache.lucene.util.Version.LUCENE_9_4_2); + public static final Version V_2_5_0 = new Version(2050099, org.apache.lucene.util.Version.LUCENE_9_4_2); public static final Version V_3_0_0 = new Version(3000099, org.apache.lucene.util.Version.LUCENE_9_5_0); public static final Version CURRENT = V_3_0_0; From 9b4a792693b68e34da551c45971c1d5c09d1a5fb Mon Sep 17 00:00:00 2001 From: Suraj Singh Date: Wed, 14 Dec 2022 13:05:34 -0800 Subject: [PATCH 6/6] Internal changes post lucene upgrade Signed-off-by: Suraj Singh --- .../org/opensearch/common/lucene/Lucene.java | 2 +- .../opensearch/index/codec/CodecService.java | 8 ++++---- .../PerFieldMappingPostingFormatCodec.java | 4 ++-- .../engine/RecoverySourcePruneMergePolicy.java | 11 +++++------ .../index/engine/TranslogLeafReader.java | 17 +++++++++++++++++ .../org/opensearch/index/search/MatchQuery.java | 8 ++++---- .../index/search/MultiMatchQuery.java | 4 ++-- .../org/opensearch/search/fetch/FetchPhase.java | 2 +- .../opensearch/search/lookup/SourceLookup.java | 2 +- .../org/opensearch/index/codec/CodecTests.java | 12 ++++++------ .../index/engine/CompletionStatsCacheTests.java | 4 ++-- 11 files changed, 45 insertions(+), 29 deletions(-) diff --git a/server/src/main/java/org/opensearch/common/lucene/Lucene.java b/server/src/main/java/org/opensearch/common/lucene/Lucene.java index 66a18ee0bddfb..1f9fe917158b9 100644 --- a/server/src/main/java/org/opensearch/common/lucene/Lucene.java +++ b/server/src/main/java/org/opensearch/common/lucene/Lucene.java @@ -109,7 +109,7 @@ * @opensearch.internal */ public class Lucene { - public static final String LATEST_CODEC = "Lucene94"; + public static final String LATEST_CODEC = "Lucene95"; public static final String SOFT_DELETES_FIELD = "__soft_deletes"; diff --git a/server/src/main/java/org/opensearch/index/codec/CodecService.java b/server/src/main/java/org/opensearch/index/codec/CodecService.java index b1e73b3855759..e4899c02d37e8 100644 --- a/server/src/main/java/org/opensearch/index/codec/CodecService.java +++ b/server/src/main/java/org/opensearch/index/codec/CodecService.java @@ -34,8 +34,8 @@ import org.apache.logging.log4j.Logger; import org.apache.lucene.codecs.Codec; -import org.apache.lucene.codecs.lucene94.Lucene94Codec; -import org.apache.lucene.codecs.lucene94.Lucene94Codec.Mode; +import org.apache.lucene.codecs.lucene95.Lucene95Codec; +import org.apache.lucene.codecs.lucene95.Lucene95Codec.Mode; import org.opensearch.common.Nullable; import org.opensearch.common.collect.MapBuilder; import org.opensearch.index.mapper.MapperService; @@ -62,8 +62,8 @@ public class CodecService { public CodecService(@Nullable MapperService mapperService, Logger logger) { final MapBuilder codecs = MapBuilder.newMapBuilder(); if (mapperService == null) { - codecs.put(DEFAULT_CODEC, new Lucene94Codec()); - codecs.put(BEST_COMPRESSION_CODEC, new Lucene94Codec(Mode.BEST_COMPRESSION)); + codecs.put(DEFAULT_CODEC, new Lucene95Codec()); + codecs.put(BEST_COMPRESSION_CODEC, new Lucene95Codec(Mode.BEST_COMPRESSION)); } else { codecs.put(DEFAULT_CODEC, new PerFieldMappingPostingFormatCodec(Mode.BEST_SPEED, mapperService, logger)); codecs.put(BEST_COMPRESSION_CODEC, new PerFieldMappingPostingFormatCodec(Mode.BEST_COMPRESSION, mapperService, logger)); diff --git a/server/src/main/java/org/opensearch/index/codec/PerFieldMappingPostingFormatCodec.java b/server/src/main/java/org/opensearch/index/codec/PerFieldMappingPostingFormatCodec.java index c101321e47350..f1b515534bdeb 100644 --- a/server/src/main/java/org/opensearch/index/codec/PerFieldMappingPostingFormatCodec.java +++ b/server/src/main/java/org/opensearch/index/codec/PerFieldMappingPostingFormatCodec.java @@ -36,7 +36,7 @@ import org.apache.lucene.codecs.Codec; import org.apache.lucene.codecs.DocValuesFormat; import org.apache.lucene.codecs.PostingsFormat; -import org.apache.lucene.codecs.lucene94.Lucene94Codec; +import org.apache.lucene.codecs.lucene95.Lucene95Codec; import org.apache.lucene.codecs.lucene90.Lucene90DocValuesFormat; import org.opensearch.common.lucene.Lucene; import org.opensearch.index.mapper.CompletionFieldMapper; @@ -53,7 +53,7 @@ * * @opensearch.internal */ -public class PerFieldMappingPostingFormatCodec extends Lucene94Codec { +public class PerFieldMappingPostingFormatCodec extends Lucene95Codec { private final Logger logger; private final MapperService mapperService; private final DocValuesFormat dvFormat = new Lucene90DocValuesFormat(); diff --git a/server/src/main/java/org/opensearch/index/engine/RecoverySourcePruneMergePolicy.java b/server/src/main/java/org/opensearch/index/engine/RecoverySourcePruneMergePolicy.java index 0c064a8f188ad..493ccbb69a244 100644 --- a/server/src/main/java/org/opensearch/index/engine/RecoverySourcePruneMergePolicy.java +++ b/server/src/main/java/org/opensearch/index/engine/RecoverySourcePruneMergePolicy.java @@ -238,8 +238,8 @@ public void close() throws IOException { } @Override - public void visitDocument(int docID, StoredFieldVisitor visitor) throws IOException { - in.visitDocument(docID, visitor); + public void document(int docID, StoredFieldVisitor visitor) throws IOException { + in.document(docID, visitor); } @Override @@ -268,11 +268,11 @@ private static class RecoverySourcePruningStoredFieldsReader extends FilterStore } @Override - public void visitDocument(int docID, StoredFieldVisitor visitor) throws IOException { + public void document(int docID, StoredFieldVisitor visitor) throws IOException { if (recoverySourceToKeep != null && recoverySourceToKeep.get(docID)) { - super.visitDocument(docID, visitor); + super.document(docID, visitor); } else { - super.visitDocument(docID, new FilterStoredFieldVisitor(visitor) { + super.document(docID, new FilterStoredFieldVisitor(visitor) { @Override public Status needsField(FieldInfo fieldInfo) throws IOException { if (recoverySourceField.equals(fieldInfo.name)) { @@ -293,7 +293,6 @@ public StoredFieldsReader getMergeInstance() { public StoredFieldsReader clone() { return new RecoverySourcePruningStoredFieldsReader(in.clone(), recoverySourceToKeep, recoverySourceField); } - } /** diff --git a/server/src/main/java/org/opensearch/index/engine/TranslogLeafReader.java b/server/src/main/java/org/opensearch/index/engine/TranslogLeafReader.java index 3a198743c3d8a..258674a096e52 100644 --- a/server/src/main/java/org/opensearch/index/engine/TranslogLeafReader.java +++ b/server/src/main/java/org/opensearch/index/engine/TranslogLeafReader.java @@ -45,6 +45,8 @@ import org.apache.lucene.index.SortedNumericDocValues; import org.apache.lucene.index.SortedSetDocValues; import org.apache.lucene.index.StoredFieldVisitor; +import org.apache.lucene.index.StoredFields; +import org.apache.lucene.index.TermVectors; import org.apache.lucene.index.Terms; import org.apache.lucene.index.VectorEncoding; import org.apache.lucene.index.VectorSimilarityFunction; @@ -201,6 +203,11 @@ public Fields getTermVectors(int docID) { throw new UnsupportedOperationException(); } + @Override + public TermVectors termVectors() throws IOException { + throw new UnsupportedOperationException(); + } + @Override public int numDocs() { return 1; @@ -232,6 +239,11 @@ public void document(int docID, StoredFieldVisitor visitor) throws IOException { } } + @Override + public StoredFields storedFields() throws IOException { + throw new UnsupportedOperationException(); + } + @Override protected void doClose() { @@ -251,4 +263,9 @@ public VectorValues getVectorValues(String field) throws IOException { public TopDocs searchNearestVectors(String field, float[] target, int k, Bits acceptDocs, int visitedLimit) throws IOException { throw new UnsupportedOperationException(); } + + @Override + public TopDocs searchNearestVectors(String field, BytesRef target, int k, Bits acceptDocs, int visitedLimit) throws IOException { + throw new UnsupportedOperationException(); + } } diff --git a/server/src/main/java/org/opensearch/index/search/MatchQuery.java b/server/src/main/java/org/opensearch/index/search/MatchQuery.java index 008f622c5bf3f..c1ea4427a7d1f 100644 --- a/server/src/main/java/org/opensearch/index/search/MatchQuery.java +++ b/server/src/main/java/org/opensearch/index/search/MatchQuery.java @@ -667,9 +667,9 @@ private void add(BooleanQuery.Builder q, String field, List current, Boole } else { // We don't apply prefix on synonyms final TermAndBoost[] termAndBoosts = current.stream() - .map(t -> new TermAndBoost(t, BoostAttribute.DEFAULT_BOOST)) + .map(t -> new TermAndBoost(t.bytes(), BoostAttribute.DEFAULT_BOOST)) .toArray(TermAndBoost[]::new); - q.add(newSynonymQuery(termAndBoosts), operator); + q.add(newSynonymQuery(field, termAndBoosts), operator); } } @@ -782,9 +782,9 @@ public Query next() { } else { // We don't apply prefix on synonyms final TermAndBoost[] termAndBoosts = Arrays.stream(terms) - .map(t -> new TermAndBoost(t, BoostAttribute.DEFAULT_BOOST)) + .map(t -> new TermAndBoost(t.bytes(), BoostAttribute.DEFAULT_BOOST)) .toArray(TermAndBoost[]::new); - queryPos = newSynonymQuery(termAndBoosts); + queryPos = newSynonymQuery(field, termAndBoosts); } } if (queryPos != null) { diff --git a/server/src/main/java/org/opensearch/index/search/MultiMatchQuery.java b/server/src/main/java/org/opensearch/index/search/MultiMatchQuery.java index c2254a56d8fd1..241f05af2c512 100644 --- a/server/src/main/java/org/opensearch/index/search/MultiMatchQuery.java +++ b/server/src/main/java/org/opensearch/index/search/MultiMatchQuery.java @@ -218,10 +218,10 @@ private class BlendedQueryBuilder extends MatchQueryBuilder { } @Override - protected Query newSynonymQuery(TermAndBoost[] terms) { + protected Query newSynonymQuery(String field, TermAndBoost[] terms) { BytesRef[] values = new BytesRef[terms.length]; for (int i = 0; i < terms.length; i++) { - values[i] = terms[i].term.bytes(); + values[i] = terms[i].term; } return blendTerms(context, values, commonTermsCutoff, tieBreaker, lenient, blendedFields); } diff --git a/server/src/main/java/org/opensearch/search/fetch/FetchPhase.java b/server/src/main/java/org/opensearch/search/fetch/FetchPhase.java index 4803184fa3abe..d82af3e55ee6d 100644 --- a/server/src/main/java/org/opensearch/search/fetch/FetchPhase.java +++ b/server/src/main/java/org/opensearch/search/fetch/FetchPhase.java @@ -157,7 +157,7 @@ public void execute(SearchContext context) { // So we do a little hack here and pretend we're going to do merges in order to // get better sequential access. SequentialStoredFieldsLeafReader lf = (SequentialStoredFieldsLeafReader) currentReaderContext.reader(); - fieldReader = lf.getSequentialStoredFieldsReader()::visitDocument; + fieldReader = lf.getSequentialStoredFieldsReader()::document; } else { fieldReader = currentReaderContext.reader()::document; } diff --git a/server/src/main/java/org/opensearch/search/lookup/SourceLookup.java b/server/src/main/java/org/opensearch/search/lookup/SourceLookup.java index fe95b78c72b82..b074f62652bab 100644 --- a/server/src/main/java/org/opensearch/search/lookup/SourceLookup.java +++ b/server/src/main/java/org/opensearch/search/lookup/SourceLookup.java @@ -137,7 +137,7 @@ public void setSegmentAndDocument(LeafReaderContext context, int docId) { // So we do a little hack here and pretend we're going to do merges in order to // get better sequential access. SequentialStoredFieldsLeafReader lf = (SequentialStoredFieldsLeafReader) context.reader(); - fieldReader = lf.getSequentialStoredFieldsReader()::visitDocument; + fieldReader = lf.getSequentialStoredFieldsReader()::document; } else { fieldReader = context.reader()::document; } diff --git a/server/src/test/java/org/opensearch/index/codec/CodecTests.java b/server/src/test/java/org/opensearch/index/codec/CodecTests.java index 0a6338333bffc..bc50525412954 100644 --- a/server/src/test/java/org/opensearch/index/codec/CodecTests.java +++ b/server/src/test/java/org/opensearch/index/codec/CodecTests.java @@ -34,7 +34,7 @@ import org.apache.logging.log4j.LogManager; import org.apache.lucene.codecs.Codec; -import org.apache.lucene.codecs.lucene94.Lucene94Codec; +import org.apache.lucene.codecs.lucene95.Lucene95Codec; import org.apache.lucene.codecs.lucene90.Lucene90StoredFieldsFormat; import org.apache.lucene.document.Document; import org.apache.lucene.index.DirectoryReader; @@ -65,21 +65,21 @@ public class CodecTests extends OpenSearchTestCase { public void testResolveDefaultCodecs() throws Exception { CodecService codecService = createCodecService(); assertThat(codecService.codec("default"), instanceOf(PerFieldMappingPostingFormatCodec.class)); - assertThat(codecService.codec("default"), instanceOf(Lucene94Codec.class)); + assertThat(codecService.codec("default"), instanceOf(Lucene95Codec.class)); } public void testDefault() throws Exception { Codec codec = createCodecService().codec("default"); - assertStoredFieldsCompressionEquals(Lucene94Codec.Mode.BEST_SPEED, codec); + assertStoredFieldsCompressionEquals(Lucene95Codec.Mode.BEST_SPEED, codec); } public void testBestCompression() throws Exception { Codec codec = createCodecService().codec("best_compression"); - assertStoredFieldsCompressionEquals(Lucene94Codec.Mode.BEST_COMPRESSION, codec); + assertStoredFieldsCompressionEquals(Lucene95Codec.Mode.BEST_COMPRESSION, codec); } // write some docs with it, inspect .si to see this was the used compression - private void assertStoredFieldsCompressionEquals(Lucene94Codec.Mode expected, Codec actual) throws Exception { + private void assertStoredFieldsCompressionEquals(Lucene95Codec.Mode expected, Codec actual) throws Exception { Directory dir = newDirectory(); IndexWriterConfig iwc = newIndexWriterConfig(null); iwc.setCodec(actual); @@ -91,7 +91,7 @@ private void assertStoredFieldsCompressionEquals(Lucene94Codec.Mode expected, Co SegmentReader sr = (SegmentReader) ir.leaves().get(0).reader(); String v = sr.getSegmentInfo().info.getAttribute(Lucene90StoredFieldsFormat.MODE_KEY); assertNotNull(v); - assertEquals(expected, Lucene94Codec.Mode.valueOf(v)); + assertEquals(expected, Lucene95Codec.Mode.valueOf(v)); ir.close(); dir.close(); } diff --git a/server/src/test/java/org/opensearch/index/engine/CompletionStatsCacheTests.java b/server/src/test/java/org/opensearch/index/engine/CompletionStatsCacheTests.java index 575997dc2609e..d960fa910fde6 100644 --- a/server/src/test/java/org/opensearch/index/engine/CompletionStatsCacheTests.java +++ b/server/src/test/java/org/opensearch/index/engine/CompletionStatsCacheTests.java @@ -32,7 +32,7 @@ package org.opensearch.index.engine; import org.apache.lucene.codecs.PostingsFormat; -import org.apache.lucene.codecs.lucene94.Lucene94Codec; +import org.apache.lucene.codecs.lucene95.Lucene95Codec; import org.apache.lucene.document.Document; import org.apache.lucene.index.DirectoryReader; import org.apache.lucene.index.IndexWriter; @@ -70,7 +70,7 @@ public void testExceptionsAreNotCached() { public void testCompletionStatsCache() throws IOException, InterruptedException { final IndexWriterConfig indexWriterConfig = newIndexWriterConfig(); final PostingsFormat postingsFormat = new Completion90PostingsFormat(); - indexWriterConfig.setCodec(new Lucene94Codec() { + indexWriterConfig.setCodec(new Lucene95Codec() { @Override public PostingsFormat getPostingsFormatForField(String field) { return postingsFormat; // all fields are suggest fields