Skip to content

Commit

Permalink
Update to Apache Lucene 10 for 3.0.0
Browse files Browse the repository at this point in the history
Signed-off-by: Andriy Redko <[email protected]>
  • Loading branch information
reta committed Oct 17, 2024
1 parent dc8a435 commit 76a5268
Show file tree
Hide file tree
Showing 54 changed files with 37 additions and 59 deletions.
17 changes: 3 additions & 14 deletions .github/workflows/assemble.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
java: [ 11, 17, 21 ]
java: [ 21, 23 ]
os: [ubuntu-latest, windows-latest, macos-13]
steps:
- uses: actions/checkout@v4
Expand All @@ -16,17 +16,6 @@ jobs:
with:
java-version: ${{ matrix.java }}
distribution: temurin
- name: Set up JDK 17
# See please https://docs.gradle.org/8.10/userguide/upgrading_version_8.html#minimum_daemon_jvm_version
if: matrix.java == 11
uses: actions/setup-java@v4
with:
java-version: 17
distribution: temurin
- name: Set JAVA${{ matrix.java }}_HOME
shell: bash
run: |
echo "JAVA${{ matrix.java }}_HOME=$JAVA_HOME_${{ matrix.java }}_${{ runner.arch }}" >> $GITHUB_ENV
- name: Setup docker (missing on MacOS)
id: setup_docker
if: runner.os == 'macos'
Expand All @@ -47,8 +36,8 @@ jobs:
shell: bash
if: runner.os != 'macos'
run: |
./gradlew assemble --parallel --no-build-cache -PDISABLE_BUILD_CACHE -Druntime.java=${{ matrix.java }}
./gradlew assemble --parallel --no-build-cache -PDISABLE_BUILD_CACHE
- name: Run Gradle (assemble)
if: runner.os == 'macos' && steps.setup_docker.outcome == 'success'
run: |
./gradlew assemble --parallel --no-build-cache -PDISABLE_BUILD_CACHE -Druntime.java=${{ matrix.java }}
./gradlew assemble --parallel --no-build-cache -PDISABLE_BUILD_CACHE
15 changes: 2 additions & 13 deletions .github/workflows/precommit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
java: [ 11, 17, 21, 23 ]
java: [ 21, 23 ]
os: [ubuntu-latest, windows-latest, macos-latest, macos-13]
steps:
- uses: actions/checkout@v4
Expand All @@ -17,18 +17,7 @@ jobs:
java-version: ${{ matrix.java }}
distribution: temurin
cache: gradle
- name: Set up JDK 17
# See please https://docs.gradle.org/8.10/userguide/upgrading_version_8.html#minimum_daemon_jvm_version
if: matrix.java == 11
uses: actions/setup-java@v4
with:
java-version: 17
distribution: temurin
- name: Set JAVA${{ matrix.java }}_HOME
shell: bash
run: |
echo "JAVA${{ matrix.java }}_HOME=$JAVA_HOME_${{ matrix.java }}_${{ runner.arch }}" >> $GITHUB_ENV
- name: Run Gradle (precommit)
shell: bash
run: |
./gradlew javadoc precommit --parallel -Druntime.java=${{ matrix.java }}
./gradlew javadoc precommit --parallel
4 changes: 2 additions & 2 deletions buildSrc/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -171,8 +171,8 @@ if (project != rootProject) {

allprojects {
java {
targetCompatibility = JavaVersion.VERSION_11
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_21
sourceCompatibility = JavaVersion.VERSION_21
}
}

Expand Down
4 changes: 2 additions & 2 deletions buildSrc/reaper/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
apply plugin: 'java'

java {
targetCompatibility = JavaVersion.VERSION_11
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_21
sourceCompatibility = JavaVersion.VERSION_21
}

jar {
Expand Down
4 changes: 2 additions & 2 deletions buildSrc/src/testKit/thirdPartyAudit/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,11 @@ dependencies {
}

tasks.register("empty", ThirdPartyAuditTask) {
targetCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_21
signatureFile = file('third-party-audit-empty.txt')
}

tasks.register("absurd", ThirdPartyAuditTask) {
targetCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_21
signatureFile = file('third-party-audit-absurd.txt')
}
2 changes: 1 addition & 1 deletion buildSrc/version.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
opensearch = 3.0.0
lucene = 9.12.0
lucene = 10.0.0

bundled_jdk_vendor = adoptium
bundled_jdk = 23+37
Expand Down
1 change: 1 addition & 0 deletions libs/core/licenses/lucene-core-10.0.0.jar.sha1
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
5a9b3f728041df5b054aaaed3c3fd7ff0fed8ee7
1 change: 0 additions & 1 deletion libs/core/licenses/lucene-core-9.12.0.jar.sha1

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public class LegacyESVersion extends Version {

public static final LegacyESVersion V_6_0_0 = new LegacyESVersion(6000099, org.apache.lucene.util.Version.fromBits(7, 0, 0));
public static final LegacyESVersion V_6_5_0 = new LegacyESVersion(6050099, org.apache.lucene.util.Version.fromBits(7, 0, 0));
public static final LegacyESVersion V_7_2_0 = new LegacyESVersion(7020099, org.apache.lucene.util.Version.LUCENE_8_0_0);
public static final LegacyESVersion V_7_2_0 = new LegacyESVersion(7020099, org.apache.lucene.util.Version.fromBits(8, 0, 0));

// todo move back to Version.java if retiring legacy version support
protected static final Map<Integer, Version> idToVersion;
Expand Down
2 changes: 1 addition & 1 deletion libs/core/src/main/java/org/opensearch/Version.java
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ public class Version implements Comparable<Version>, ToXContentFragment {
public static final Version V_2_17_1 = new Version(2170199, org.apache.lucene.util.Version.LUCENE_9_11_1);
public static final Version V_2_17_2 = new Version(2170299, org.apache.lucene.util.Version.LUCENE_9_11_1);
public static final Version V_2_18_0 = new Version(2180099, org.apache.lucene.util.Version.LUCENE_9_12_0);
public static final Version V_3_0_0 = new Version(3000099, org.apache.lucene.util.Version.LUCENE_9_12_0);
public static final Version V_3_0_0 = new Version(3000099, org.apache.lucene.util.Version.LUCENE_10_0_0);
public static final Version CURRENT = V_3_0_0;

public static Version fromId(int id) {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
89b26348ec305598fc224cc9583939564b67b2cf

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
082c38c1335c069a73622c37ca3d39e64c1b2d33

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
26071742008630779523d08c0b46b2f371ef23a0

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
4a6ff02a1bd34a3c0165da05f714bb8188074bdc

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
4c488697df5038a78e5e65bb9b6da120af62d824

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
1137b9846ec000b49c70c3fe5f8cd79b7129be22

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3fd86db5e9748063369db4bed84f1bd2ca62d387

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
4e6b940b3b934d6de174fedaaeaefd647698648d

This file was deleted.

1 change: 1 addition & 0 deletions server/licenses/lucene-analysis-common-10.0.0.jar.sha1
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
13eb016bab14973158554a2e6cdf2abbc5c3eda1
1 change: 0 additions & 1 deletion server/licenses/lucene-analysis-common-9.12.0.jar.sha1

This file was deleted.

1 change: 1 addition & 0 deletions server/licenses/lucene-backward-codecs-10.0.0.jar.sha1
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
8e21f708eb1bbb71ce79cbfea093b6ca913f4abf
1 change: 0 additions & 1 deletion server/licenses/lucene-backward-codecs-9.12.0.jar.sha1

This file was deleted.

1 change: 1 addition & 0 deletions server/licenses/lucene-core-10.0.0.jar.sha1
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
5a9b3f728041df5b054aaaed3c3fd7ff0fed8ee7
1 change: 0 additions & 1 deletion server/licenses/lucene-core-9.12.0.jar.sha1

This file was deleted.

1 change: 1 addition & 0 deletions server/licenses/lucene-grouping-10.0.0.jar.sha1
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
17145d786d31e7ecd68d149ccc3e7ab83270f282
1 change: 0 additions & 1 deletion server/licenses/lucene-grouping-9.12.0.jar.sha1

This file was deleted.

1 change: 1 addition & 0 deletions server/licenses/lucene-highlighter-10.0.0.jar.sha1
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
b8324f1b859620912c186b27d9666215ce3d258b
1 change: 0 additions & 1 deletion server/licenses/lucene-highlighter-9.12.0.jar.sha1

This file was deleted.

1 change: 1 addition & 0 deletions server/licenses/lucene-join-10.0.0.jar.sha1
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3a4c5bf84c855b011e740f30cb8a23f2ee85e1c1
1 change: 0 additions & 1 deletion server/licenses/lucene-join-9.12.0.jar.sha1

This file was deleted.

1 change: 1 addition & 0 deletions server/licenses/lucene-memory-10.0.0.jar.sha1
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
bc0f37a0a06b445555d07e5fe199d73436d51352
1 change: 0 additions & 1 deletion server/licenses/lucene-memory-9.12.0.jar.sha1

This file was deleted.

1 change: 1 addition & 0 deletions server/licenses/lucene-misc-10.0.0.jar.sha1
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
5f619b32c62bb9405e7af595cf7311113ed62e33
1 change: 0 additions & 1 deletion server/licenses/lucene-misc-9.12.0.jar.sha1

This file was deleted.

1 change: 1 addition & 0 deletions server/licenses/lucene-queries-10.0.0.jar.sha1
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3d2f98787e27e8e2a65d994c86563edf16dd92f1
1 change: 0 additions & 1 deletion server/licenses/lucene-queries-9.12.0.jar.sha1

This file was deleted.

1 change: 1 addition & 0 deletions server/licenses/lucene-queryparser-10.0.0.jar.sha1
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
e11886c913058ef20378715dee715d942d04babc
1 change: 0 additions & 1 deletion server/licenses/lucene-queryparser-9.12.0.jar.sha1

This file was deleted.

1 change: 1 addition & 0 deletions server/licenses/lucene-sandbox-10.0.0.jar.sha1
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
1795ce5b066bda61483c375f6b8e358aaa4f6348
1 change: 0 additions & 1 deletion server/licenses/lucene-sandbox-9.12.0.jar.sha1

This file was deleted.

1 change: 1 addition & 0 deletions server/licenses/lucene-spatial-extras-10.0.0.jar.sha1
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
a701eb363cf0a75ebacd1844398314250abcf592
1 change: 0 additions & 1 deletion server/licenses/lucene-spatial-extras-9.12.0.jar.sha1

This file was deleted.

1 change: 1 addition & 0 deletions server/licenses/lucene-spatial3d-10.0.0.jar.sha1
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
d9e0a8a6084d7657a633c1aa94d750414f5288c4
1 change: 0 additions & 1 deletion server/licenses/lucene-spatial3d-9.12.0.jar.sha1

This file was deleted.

1 change: 1 addition & 0 deletions server/licenses/lucene-suggest-10.0.0.jar.sha1
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
d79099abc148a1906e129abbabd5e1b18a20c117
1 change: 0 additions & 1 deletion server/licenses/lucene-suggest-9.12.0.jar.sha1

This file was deleted.

0 comments on commit 76a5268

Please sign in to comment.