Skip to content

Commit 47454df

Browse files
authored
Ensure we always use vectorization in Lucene (#124914)
By default Lucene only uses vectorization up to the JDK version available at the time of its release. When testing against EA versions, we want to still use vectorization. This commit adds a sysprop to force lucene to use the current version for vectorization.
1 parent 0e6d6f4 commit 47454df

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

distribution/tools/server-cli/src/main/java/org/elasticsearch/server/cli/SystemJvmOptions.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,8 @@ static List<String> systemJvmOptions(Settings nodeSettings, final Map<String, St
6666
"-Dlog4j2.disable.jmx=true",
6767
"-Dlog4j2.formatMsgNoLookups=true",
6868
"-Djava.locale.providers=CLDR",
69+
// Enable vectorization for whatever version we are running. This ensures we use vectorization even when running EA builds.
70+
"-Dorg.apache.lucene.vectorization.upperJavaFeatureVersion=" + Runtime.version().feature(),
6971
// Pass through distribution type
7072
"-Des.distribution.type=" + distroType
7173
),

0 commit comments

Comments
 (0)