Skip to content

armgit / solr

Public Imported from GitHub
0

Apache Solr open-source search software

SOLR-16442: upgrade to Lucene 9.4 (do and document) (#1056)

Christine Poerschke4ab7f4b712b8
diff --git a/dev-docs/lucene-upgrade.md b/dev-docs/lucene-upgrade.md
new file mode 100644
index 00000000000..be2b5f8cc95
--- /dev/null
+++ b/dev-docs/lucene-upgrade.md
@@ -0,0 +1,93 @@
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ -->
+
+# Lucene upgrade steps
+
+## Read
+
+https://lucene.apache.org/core/9_4_0/MIGRATE.html
+
+## Start
+
+Create a new branch locally e.g. `git checkout -b lucene940 -t origin/main` for upgrading to Lucene 9.4.0 version.
+
+## Build
+
+### `versions.props` update
+
+```
+- org.apache.lucene:*=9.3.0
++ org.apache.lucene:*=9.4.0
+```
+
+### `versions.lock` update
+
+```
+gradlew --write-locks
+```
+
+### `solr/licenses` update
+
+```
+git rm lucene-*-9.3.0.jar.sha1
+
+# ???manually get new .sha1 files???
+
+git add lucene-*-9.4.0.jar.sha1
+```
+
+## Code
+
+```
+gradlew compileJava
+```
+
+* adjust for signature changes e.g.
+ * `int` to `long` type change
+ * additional or removed constructor arguments
+ * additional abstract base class or interface methods
+ * inner classes becoming outer classes
+* codec changes (if any)
+ * conceptually `s/org.apache.lucene.codecs.lucene9x.Lucene9x/org.apache.lucene.codecs.lucene94.Lucene94`
+
+## Test
+
+```
+gradlew compileTestJava
+```
+
+```
+gradlew precommit
+```
+
+```
+gradlew test
+```
+
+## Documentation
+
+### `solr/solr-ref-guide/antora.yml` update
+
+```
+- lucene-javadocs: 'https://lucene.apache.org/core/9_3_0'
++ lucene-javadocs: 'https://lucene.apache.org/core/9_4_0'
+```
+
+## Finish
+
+Push the local branch to github (fork) and open a pull request.
+
diff --git a/solr/core/src/java/org/apache/solr/core/MMapDirectoryFactory.java b/solr/core/src/java/org/apache/solr/core/MMapDirectoryFactory.java
index 1c0197894dd..b2b40297967 100644
--- a/solr/core/src/java/org/apache/solr/core/MMapDirectoryFactory.java
+++ b/solr/core/src/java/org/apache/solr/core/MMapDirectoryFactory.java
@@ -37,20 +37,20 @@ import org.slf4j.LoggerFactory;
* <li>unmap -- See {@link MMapDirectory#setUseUnmap(boolean)}
* <li>preload -- See {@link MMapDirectory#setPreload(boolean)}
* <li>maxChunkSize -- The Max chunk size. See {@link MMapDirectory#MMapDirectory(Path,
- * LockFactory, int)}
+ * LockFactory, long)}
* </ul>
*/
public class MMapDirectoryFactory extends StandardDirectoryFactory {
private static final Logger log = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
boolean unmapHack;
boolean preload;
- private int maxChunk;
+ private long maxChunk;
@Override
public void init(NamedList<?> args) {
super.init(args);
SolrParams params = args.toSolrParams();
- maxChunk = params.getInt("maxChunkSize", MMapDirectory.DEFAULT_MAX_CHUNK_SIZE);
+ maxChunk = params.getLong("maxChunkSize", MMapDirectory.DEFAULT_MAX_CHUNK_SIZE);
if (maxChunk <= 0) {
throw new IllegalArgumentException("maxChunk must be greater than 0");
}
diff --git a/solr/core/src/java/org/apache/solr/core/SchemaCodecFactory.java b/solr/core/src/java/org/apache/solr/core/SchemaCodecFactory.java
index 0b43275d617..df533b20900 100644
--- a/solr/core/src/java/org/apache/solr/core/SchemaCodecFactory.java
+++ b/solr/core/src/java/org/apache/solr/core/SchemaCodecFactory.java
@@ -23,9 +23,9 @@ import org.apache.lucene.codecs.Codec;
import org.apache.lucene.codecs.DocValuesFormat;
import org.apache.lucene.codecs.KnnVectorsFormat;
import org.apache.lucene.codecs.PostingsFormat;
-import org.apache.lucene.codecs.lucene92.Lucene92Codec;
-import org.apache.lucene.codecs.lucene92.Lucene92Codec.Mode;
-import org.apache.lucene.codecs.lucene92.Lucene92HnswVectorsFormat;
+import org.apache.lucene.codecs.lucene94.Lucene94Codec;
+import org.apache.lucene.codecs.lucene94.Lucene94Codec.Mode;
+import org.apache.lucene.codecs.lucene94.Lucene94HnswVectorsFormat;
import org.apache.solr.common.SolrException;
import org.apache.solr.common.SolrException.ErrorCode;
import org.apache.solr.common.util.NamedList;
@@ -92,7 +92,7 @@ public class SchemaCodecFactory extends CodecFactory implements SolrCoreAware {
log.debug("Using default compressionMode: {}", compressionMode);
}
codec =
- new Lucene92Codec(compressionMode) {
+ new Lucene94Codec(compressionMode) {
@Override
public PostingsFormat getPostingsFormatForField(String field) {
final SchemaField schemaField = core.getLatestSchema().getFieldOrNull(field);
@@ -128,7 +128,7 @@ public class SchemaCodecFactory extends CodecFactory implements SolrCoreAware {
if (knnAlgorithm.equals(DenseVectorField.HNSW_ALGORITHM)) {
int maxConn = vectorType.getHnswMaxConn();
int beamWidth = vectorType.getHnswBeamWidth();
- return new Lucene92HnswVectorsFormat(maxConn, beamWidth);
+ return new Lucene94HnswVectorsFormat(maxConn, beamWidth);
}
} else {
throw new SolrException(
diff --git a/solr/core/src/java/org/apache/solr/schema/DenseVectorField.java b/solr/core/src/java/org/apache/solr/schema/DenseVectorField.java
index 7210b8a4293..33ad1b62302 100644
--- a/solr/core/src/java/org/apache/solr/schema/DenseVectorField.java
+++ b/solr/core/src/java/org/apache/solr/schema/DenseVectorField.java
@@ -17,8 +17,8 @@
package org.apache.solr.schema;
import static java.util.Optional.ofNullable;
-import static org.apache.lucene.codecs.lucene92.Lucene92HnswVectorsFormat.DEFAULT_BEAM_WIDTH;
-import static org.apache.lucene.codecs.lucene92.Lucene92HnswVectorsFormat.DEFAULT_MAX_CONN;
+import static org.apache.lucene.codecs.lucene94.Lucene94HnswVectorsFormat.DEFAULT_BEAM_WIDTH;
+import static org.apache.lucene.codecs.lucene94.Lucene94HnswVectorsFormat.DEFAULT_MAX_CONN;
import java.util.ArrayList;
import java.util.List;
diff --git a/solr/core/src/java/org/apache/solr/schema/SchemaField.java b/solr/core/src/java/org/apache/solr/schema/SchemaField.java
index d52e80c769a..64c02917064 100644
--- a/solr/core/src/java/org/apache/solr/schema/SchemaField.java
+++ b/solr/core/src/java/org/apache/solr/schema/SchemaField.java
@@ -25,6 +25,7 @@ import org.apache.lucene.index.DocValuesType;
import org.apache.lucene.index.IndexOptions;
import org.apache.lucene.index.IndexableField;
import org.apache.lucene.index.IndexableFieldType;
+import org.apache.lucene.index.VectorEncoding;
import org.apache.lucene.index.VectorSimilarityFunction;
import org.apache.lucene.search.SortField;
import org.apache.solr.common.SolrException;
@@ -548,6 +549,11 @@ public final class SchemaField extends FieldProperties implements IndexableField
return 0;
}
+ @Override
+ public VectorEncoding vectorEncoding() {
+ return VectorEncoding.BYTE;
+ }
+
@Override
public VectorSimilarityFunction vectorSimilarityFunction() {
return VectorSimilarityFunction.EUCLIDEAN;
diff --git a/solr/core/src/java/org/apache/solr/search/CollapsingQParserPlugin.java b/solr/core/src/java/org/apache/solr/search/CollapsingQParserPlugin.java
index 1736e193088..8de0a4bbe53 100644
--- a/solr/core/src/java/org/apache/solr/search/CollapsingQParserPlugin.java
+++ b/solr/core/src/java/org/apache/solr/search/CollapsingQParserPlugin.java
@@ -522,6 +522,7 @@ public class CollapsingQParserPlugin extends QParserPlugin {
fieldInfo.getPointIndexDimensionCount(),
fieldInfo.getPointNumBytes(),
fieldInfo.getVectorDimension(),
+ fieldInfo.getVectorEncoding(),
fieldInfo.getVectorSimilarityFunction(),
fieldInfo.isSoftDeletesField());
newInfos.add(f);
diff --git a/solr/core/src/java/org/apache/solr/search/NumericHidingLeafReader.java b/solr/core/src/java/org/apache/solr/search/NumericHidingLeafReader.java
index 8dfe8354ed8..90dd9a77585 100644
--- a/solr/core/src/java/org/apache/solr/search/NumericHidingLeafReader.java
+++ b/solr/core/src/java/org/apache/solr/search/NumericHidingLeafReader.java
@@ -74,6 +74,7 @@ public class NumericHidingLeafReader extends FilterLeafReader {
fi.getPointIndexDimensionCount(),
fi.getPointNumBytes(),
fi.getVectorDimension(),
+ fi.getVectorEncoding(),
fi.getVectorSimilarityFunction(),
fi.isSoftDeletesField()));
} else {
diff --git a/solr/core/src/java/org/apache/solr/uninverting/UninvertingReader.java b/solr/core/src/java/org/apache/solr/uninverting/UninvertingReader.java
index b13c62036d7..464bf0f2811 100644
--- a/solr/core/src/java/org/apache/solr/uninverting/UninvertingReader.java
+++ b/solr/core/src/java/org/apache/solr/uninverting/UninvertingReader.java
@@ -296,6 +296,7 @@ public class UninvertingReader extends FilterLeafReader {
fi.getPointIndexDimensionCount(),
fi.getPointNumBytes(),
fi.getVectorDimension(),
+ fi.getVectorEncoding(),
fi.getVectorSimilarityFunction(),
fi.isSoftDeletesField()));
} else {
diff --git a/solr/core/src/test/org/apache/solr/core/TestCodecSupport.java b/solr/core/src/test/org/apache/solr/core/TestCodecSupport.java
index 692eb76c3d2..b91e7c83d85 100644
--- a/solr/core/src/test/org/apache/solr/core/TestCodecSupport.java
+++ b/solr/core/src/test/org/apache/solr/core/TestCodecSupport.java
@@ -21,7 +21,7 @@ import static org.apache.lucene.codecs.lucene90.Lucene90StoredFieldsFormat.MODE_
import java.io.IOException;
import java.util.Map;
import org.apache.lucene.codecs.Codec;
-import org.apache.lucene.codecs.lucene92.Lucene92Codec.Mode;
+import org.apache.lucene.codecs.lucene94.Lucene94Codec.Mode;
import org.apache.lucene.codecs.perfield.PerFieldDocValuesFormat;
import org.apache.lucene.codecs.perfield.PerFieldPostingsFormat;
import org.apache.lucene.index.SegmentInfo;
diff --git a/solr/licenses/lucene-analysis-common-9.3.0.jar.sha1 b/solr/licenses/lucene-analysis-common-9.3.0.jar.sha1
deleted file mode 100644
index e3b37baf78b..00000000000
--- a/solr/licenses/lucene-analysis-common-9.3.0.jar.sha1
+++ /dev/null
@@ -1 +0,0 @@
-03496708a19a8a55a0dc4f61f8aa2febc6e8977c
diff --git a/solr/licenses/lucene-analysis-common-9.4.0.jar.sha1 b/solr/licenses/lucene-analysis-common-9.4.0.jar.sha1
new file mode 100644
index 00000000000..d4db2877c48
--- /dev/null
+++ b/solr/licenses/lucene-analysis-common-9.4.0.jar.sha1
@@ -0,0 +1 @@
+02fbd4e87241411fcf5d34e92a50bee46ab164dc
\ No newline at end of file
diff --git a/solr/licenses/lucene-analysis-icu-9.3.0.jar.sha1 b/solr/licenses/lucene-analysis-icu-9.3.0.jar.sha1
deleted file mode 100644
index 53f2e3f3caa..00000000000
--- a/solr/licenses/lucene-analysis-icu-9.3.0.jar.sha1
+++ /dev/null
@@ -1 +0,0 @@
-11dd9be0448fe594cf918f5260e193b3ab4e07a0
diff --git a/solr/licenses/lucene-analysis-icu-9.4.0.jar.sha1 b/solr/licenses/lucene-analysis-icu-9.4.0.jar.sha1
new file mode 100644
index 00000000000..0038e3153b1
--- /dev/null
+++ b/solr/licenses/lucene-analysis-icu-9.4.0.jar.sha1
@@ -0,0 +1 @@
+aa0f250558375922f3091820361156e514fe1842
\ No newline at end of file
diff --git a/solr/licenses/lucene-analysis-kuromoji-9.3.0.jar.sha1 b/solr/licenses/lucene-analysis-kuromoji-9.3.0.jar.sha1
deleted file mode 100644
index 721584d4e5f..00000000000
--- a/solr/licenses/lucene-analysis-kuromoji-9.3.0.jar.sha1
+++ /dev/null
@@ -1 +0,0 @@
-87c1357612f2f483174d1a63ea8c6680a1696bac
diff --git a/solr/licenses/lucene-analysis-kuromoji-9.4.0.jar.sha1 b/solr/licenses/lucene-analysis-kuromoji-9.4.0.jar.sha1
new file mode 100644
index 00000000000..ec8c78a5805
--- /dev/null
+++ b/solr/licenses/lucene-analysis-kuromoji-9.4.0.jar.sha1
@@ -0,0 +1 @@
+32eb1ad367ab1289804aeed95ea7216711a7764d
\ No newline at end of file
diff --git a/solr/licenses/lucene-analysis-morfologik-9.3.0.jar.sha1 b/solr/licenses/lucene-analysis-morfologik-9.3.0.jar.sha1
deleted file mode 100644
index 30848e52766..00000000000
--- a/solr/licenses/lucene-analysis-morfologik-9.3.0.jar.sha1
+++ /dev/null
@@ -1 +0,0 @@
-3c0e4177aa87a4be2826a360f656f3559ea3f997
diff --git a/solr/licenses/lucene-analysis-morfologik-9.4.0.jar.sha1 b/solr/licenses/lucene-analysis-morfologik-9.4.0.jar.sha1
new file mode 100644
index 00000000000..7cc4a7131f8
--- /dev/null
+++ b/solr/licenses/lucene-analysis-morfologik-9.4.0.jar.sha1
@@ -0,0 +1 @@
+13e1ae2c760d8c0d7990ffe3296e46d9d8e6f842
\ No newline at end of file
diff --git a/solr/licenses/lucene-analysis-nori-9.3.0.jar.sha1 b/solr/licenses/lucene-analysis-nori-9.3.0.jar.sha1
deleted file mode 100644
index 852e78340e1..00000000000
--- a/solr/licenses/lucene-analysis-nori-9.3.0.jar.sha1
+++ /dev/null
@@ -1 +0,0 @@
-5d032dbeb3f4015741336a877dd4b0e62099246c
diff --git a/solr/licenses/lucene-analysis-nori-9.4.0.jar.sha1 b/solr/licenses/lucene-analysis-nori-9.4.0.jar.sha1
new file mode 100644
index 00000000000..438585ee3af
--- /dev/null
+++ b/solr/licenses/lucene-analysis-nori-9.4.0.jar.sha1
@@ -0,0 +1 @@
+63661714be65f882a921d281965b0779fd487b90
\ No newline at end of file
diff --git a/solr/licenses/lucene-analysis-opennlp-9.3.0.jar.sha1 b/solr/licenses/lucene-analysis-opennlp-9.3.0.jar.sha1
deleted file mode 100644
index b54cd619816..00000000000
--- a/solr/licenses/lucene-analysis-opennlp-9.3.0.jar.sha1
+++ /dev/null
@@ -1 +0,0 @@
-3f000442e14e12b30593e77f5c0edf0b2eb9b1da
diff --git a/solr/licenses/lucene-analysis-opennlp-9.4.0.jar.sha1 b/solr/licenses/lucene-analysis-opennlp-9.4.0.jar.sha1
new file mode 100644
index 00000000000..969fd39ddaf
--- /dev/null
+++ b/solr/licenses/lucene-analysis-opennlp-9.4.0.jar.sha1
@@ -0,0 +1 @@
+c0ca97d8f89e674084b44240d587453cf5df8670
\ No newline at end of file
diff --git a/solr/licenses/lucene-analysis-phonetic-9.3.0.jar.sha1 b/solr/licenses/lucene-analysis-phonetic-9.3.0.jar.sha1
deleted file mode 100644
index c69abaf4555..00000000000
--- a/solr/licenses/lucene-analysis-phonetic-9.3.0.jar.sha1
+++ /dev/null
@@ -1 +0,0 @@
-fe6ac8772b545e0abd0c755cd4bd07caad58edb9
diff --git a/solr/licenses/lucene-analysis-phonetic-9.4.0.jar.sha1 b/solr/licenses/lucene-analysis-phonetic-9.4.0.jar.sha1
new file mode 100644
index 00000000000..019a98dc594
--- /dev/null
+++ b/solr/licenses/lucene-analysis-phonetic-9.4.0.jar.sha1
@@ -0,0 +1 @@
+1034d876551fc21f7835b456dab01db21b9a4af6
\ No newline at end of file
diff --git a/solr/licenses/lucene-analysis-smartcn-9.3.0.jar.sha1 b/solr/licenses/lucene-analysis-smartcn-9.3.0.jar.sha1
deleted file mode 100644
index 89e34278919..00000000000
--- a/solr/licenses/lucene-analysis-smartcn-9.3.0.jar.sha1
+++ /dev/null
@@ -1 +0,0 @@
-288726e13b598c341e81aef8b5c9ce53f51889d0
diff --git a/solr/licenses/lucene-analysis-smartcn-9.4.0.jar.sha1 b/solr/licenses/lucene-analysis-smartcn-9.4.0.jar.sha1
new file mode 100644
index 00000000000..cc8e31b7a24
--- /dev/null
+++ b/solr/licenses/lucene-analysis-smartcn-9.4.0.jar.sha1
@@ -0,0 +1 @@
+f704ee4b14e2fe2622bb983f04b36a32df8fd4a7
\ No newline at end of file
diff --git a/solr/licenses/lucene-analysis-stempel-9.3.0.jar.sha1 b/solr/licenses/lucene-analysis-stempel-9.3.0.jar.sha1
deleted file mode 100644
index b3c2b2bbcd8..00000000000
--- a/solr/licenses/lucene-analysis-stempel-9.3.0.jar.sha1
+++ /dev/null
@@ -1 +0,0 @@
-166d02f7f98f18c6607335030a404fcad8f57cd6
diff --git a/solr/licenses/lucene-analysis-stempel-9.4.0.jar.sha1 b/solr/licenses/lucene-analysis-stempel-9.4.0.jar.sha1
new file mode 100644
index 00000000000..25e115b8430
--- /dev/null
+++ b/solr/licenses/lucene-analysis-stempel-9.4.0.jar.sha1
@@ -0,0 +1 @@
+a95ff17b51da6b3da641fa4053e5ee9ea2ff5daf
\ No newline at end of file
diff --git a/solr/licenses/lucene-backward-codecs-9.3.0.jar.sha1 b/solr/licenses/lucene-backward-codecs-9.3.0.jar.sha1
deleted file mode 100644
index 808e2358c8c..00000000000
--- a/solr/licenses/lucene-backward-codecs-9.3.0.jar.sha1
+++ /dev/null
@@ -1 +0,0 @@
-95ea01ee0d1e543e18e3cf58d8a6a27a587a7239
diff --git a/solr/licenses/lucene-backward-codecs-9.4.0.jar.sha1 b/solr/licenses/lucene-backward-codecs-9.4.0.jar.sha1
new file mode 100644
index 00000000000..1b7b53ef9fe
--- /dev/null
+++ b/solr/licenses/lucene-backward-codecs-9.4.0.jar.sha1
@@ -0,0 +1 @@
+259863dfd107645de6146b3c87b4ecee66a4d43d
\ No newline at end of file
diff --git a/solr/licenses/lucene-classification-9.3.0.jar.sha1 b/solr/licenses/lucene-classification-9.3.0.jar.sha1
deleted file mode 100644
index 675f62f95a8..00000000000
--- a/solr/licenses/lucene-classification-9.3.0.jar.sha1
+++ /dev/null
@@ -1 +0,0 @@
-869e85fc63f762990bbd4de01f5db8bd88846a72
diff --git a/solr/licenses/lucene-classification-9.4.0.jar.sha1 b/solr/licenses/lucene-classification-9.4.0.jar.sha1
new file mode 100644
index 00000000000..7a2c4b37417
--- /dev/null
+++ b/solr/licenses/lucene-classification-9.4.0.jar.sha1
@@ -0,0 +1 @@
+35fb746cbfc8a36264a2e6352294d8a45c9006fe
\ No newline at end of file
diff --git a/solr/licenses/lucene-codecs-9.3.0.jar.sha1 b/solr/licenses/lucene-codecs-9.3.0.jar.sha1
deleted file mode 100644
index 43908225541..00000000000
--- a/solr/licenses/lucene-codecs-9.3.0.jar.sha1
+++ /dev/null
@@ -1 +0,0 @@
-da4e2de2008a0e8c33da7177b85225604cb5200e
diff --git a/solr/licenses/lucene-codecs-9.4.0.jar.sha1 b/solr/licenses/lucene-codecs-9.4.0.jar.sha1
new file mode 100644
index 00000000000..5695aa64cc1
--- /dev/null
+++ b/solr/licenses/lucene-codecs-9.4.0.jar.sha1
@@ -0,0 +1 @@
+5c9d00dbe95e88980938f20be1e130070dd03b3a
\ No newline at end of file
diff --git a/solr/licenses/lucene-core-9.3.0.jar.sha1 b/solr/licenses/lucene-core-9.3.0.jar.sha1
deleted file mode 100644
index f34b9127acb..00000000000
--- a/solr/licenses/lucene-core-9.3.0.jar.sha1
+++ /dev/null
@@ -1 +0,0 @@
-a030180999bc3f1a65f23f53b38098ca9daeee79
diff --git a/solr/licenses/lucene-core-9.4.0.jar.sha1 b/solr/licenses/lucene-core-9.4.0.jar.sha1
new file mode 100644
index 00000000000..66f7f244851
--- /dev/null
+++ b/solr/licenses/lucene-core-9.4.0.jar.sha1
@@ -0,0 +1 @@
+cca1116f813c0f0c63acfac4c952baf29d46d76b
\ No newline at end of file
diff --git a/solr/licenses/lucene-expressions-9.3.0.jar.sha1 b/solr/licenses/lucene-expressions-9.3.0.jar.sha1
deleted file mode 100644
index af971b587c0..00000000000
--- a/solr/licenses/lucene-expressions-9.3.0.jar.sha1
+++ /dev/null
@@ -1 +0,0 @@
-5583bcd3a24d3aae40b0a3152458021844ac09aa
diff --git a/solr/licenses/lucene-expressions-9.4.0.jar.sha1 b/solr/licenses/lucene-expressions-9.4.0.jar.sha1
new file mode 100644
index 00000000000..2b647c1270e
--- /dev/null
+++ b/solr/licenses/lucene-expressions-9.4.0.jar.sha1
@@ -0,0 +1 @@
+19749e264805171009836cbedecc5494b13cd920
\ No newline at end of file
diff --git a/solr/licenses/lucene-grouping-9.3.0.jar.sha1 b/solr/licenses/lucene-grouping-9.3.0.jar.sha1
deleted file mode 100644
index 52184d05136..00000000000
--- a/solr/licenses/lucene-grouping-9.3.0.jar.sha1
+++ /dev/null
@@ -1 +0,0 @@
-883071196e53ec93d2a53dcc8211ee30be6c00dc
diff --git a/solr/licenses/lucene-grouping-9.4.0.jar.sha1 b/solr/licenses/lucene-grouping-9.4.0.jar.sha1
new file mode 100644
index 00000000000..fe79c0efd34
--- /dev/null
+++ b/solr/licenses/lucene-grouping-9.4.0.jar.sha1
@@ -0,0 +1 @@
+51bec1d5acc8ecaf9f50e047d3f86d60c7a958f4
\ No newline at end of file
diff --git a/solr/licenses/lucene-highlighter-9.3.0.jar.sha1 b/solr/licenses/lucene-highlighter-9.3.0.jar.sha1
deleted file mode 100644
index e7a73f75199..00000000000
--- a/solr/licenses/lucene-highlighter-9.3.0.jar.sha1
+++ /dev/null
@@ -1 +0,0 @@
-7e895c49b9991ea2ec08855c425b9eae44a08764
diff --git a/solr/licenses/lucene-highlighter-9.4.0.jar.sha1 b/solr/licenses/lucene-highlighter-9.4.0.jar.sha1
new file mode 100644
index 00000000000..54700f08a3f
--- /dev/null
+++ b/solr/licenses/lucene-highlighter-9.4.0.jar.sha1
@@ -0,0 +1 @@
+c8cf8c9308d8fb18a927c7ed267a14ace3990a5f
\ No newline at end of file
diff --git a/solr/licenses/lucene-join-9.3.0.jar.sha1 b/solr/licenses/lucene-join-9.3.0.jar.sha1
deleted file mode 100644
index ebce870dff1..00000000000
--- a/solr/licenses/lucene-join-9.3.0.jar.sha1
+++ /dev/null
@@ -1 +0,0 @@
-04baaae4ce4a35ae919150dd17cd1e63b0da9d24
diff --git a/solr/licenses/lucene-join-9.4.0.jar.sha1 b/solr/licenses/lucene-join-9.4.0.jar.sha1
new file mode 100644
index 00000000000..752006d3a66
--- /dev/null
+++ b/solr/licenses/lucene-join-9.4.0.jar.sha1
@@ -0,0 +1 @@
+99b2d3c8e137a6853a2503456897d47d4f18974b
\ No newline at end of file
diff --git a/solr/licenses/lucene-memory-9.3.0.jar.sha1 b/solr/licenses/lucene-memory-9.3.0.jar.sha1
deleted file mode 100644
index 9acb9f5f01c..00000000000
--- a/solr/licenses/lucene-memory-9.3.0.jar.sha1
+++ /dev/null
@@ -1 +0,0 @@
-1a2203b332edc1366b9789f5286296e109dbc8c4
diff --git a/solr/licenses/lucene-memory-9.4.0.jar.sha1 b/solr/licenses/lucene-memory-9.4.0.jar.sha1
new file mode 100644
index 00000000000..27b48869996
--- /dev/null
+++ b/solr/licenses/lucene-memory-9.4.0.jar.sha1
@@ -0,0 +1 @@
+881cb214e79da14de35cb0e8e6779d2722828a96
\ No newline at end of file
diff --git a/solr/licenses/lucene-misc-9.3.0.jar.sha1 b/solr/licenses/lucene-misc-9.3.0.jar.sha1
deleted file mode 100644
index 86599542e82..00000000000
--- a/solr/licenses/lucene-misc-9.3.0.jar.sha1
+++ /dev/null
@@ -1 +0,0 @@
-61b502c9557247b6803a346c0bab20c9dc89d125
diff --git a/solr/licenses/lucene-misc-9.4.0.jar.sha1 b/solr/licenses/lucene-misc-9.4.0.jar.sha1
new file mode 100644
index 00000000000..f9924475b9a
--- /dev/null
+++ b/solr/licenses/lucene-misc-9.4.0.jar.sha1
@@ -0,0 +1 @@
+a126123e482e6bf2e7aea670d221a2a39d3277dc
\ No newline at end of file
diff --git a/solr/licenses/lucene-queries-9.3.0.jar.sha1 b/solr/licenses/lucene-queries-9.3.0.jar.sha1
deleted file mode 100644
index 0526043edb1..00000000000
--- a/solr/licenses/lucene-queries-9.3.0.jar.sha1
+++ /dev/null
@@ -1 +0,0 @@
-d8fe3bce3c05015c5fdb78279f36b9f1a75b98d8
diff --git a/solr/licenses/lucene-queries-9.4.0.jar.sha1 b/solr/licenses/lucene-queries-9.4.0.jar.sha1
new file mode 100644
index 00000000000..65e441bfdaf
--- /dev/null
+++ b/solr/licenses/lucene-queries-9.4.0.jar.sha1
@@ -0,0 +1 @@
+fe74dbfe9dba9ee9ee2cb80f151fde97fb4efd12
\ No newline at end of file
diff --git a/solr/licenses/lucene-queryparser-9.3.0.jar.sha1 b/solr/licenses/lucene-queryparser-9.3.0.jar.sha1
deleted file mode 100644
index 791f07b1c3c..00000000000
--- a/solr/licenses/lucene-queryparser-9.3.0.jar.sha1
+++ /dev/null
@@ -1 +0,0 @@
-78f259a66d48f77a2d2b96a0a858efa08eba72dc
diff --git a/solr/licenses/lucene-queryparser-9.4.0.jar.sha1 b/solr/licenses/lucene-queryparser-9.4.0.jar.sha1
new file mode 100644
index 00000000000..2d454942d52
--- /dev/null
+++ b/solr/licenses/lucene-queryparser-9.4.0.jar.sha1
@@ -0,0 +1 @@
+13f108a8572fcf0670c7df3ba8dbe1076d0e0dbe
\ No newline at end of file
diff --git a/solr/licenses/lucene-sandbox-9.3.0.jar.sha1 b/solr/licenses/lucene-sandbox-9.3.0.jar.sha1
deleted file mode 100644
index 3cab8fb989b..00000000000
--- a/solr/licenses/lucene-sandbox-9.3.0.jar.sha1
+++ /dev/null
@@ -1 +0,0 @@
-5ee318cf8e9a70c2c99e03e157465316a3d4a17a
diff --git a/solr/licenses/lucene-sandbox-9.4.0.jar.sha1 b/solr/licenses/lucene-sandbox-9.4.0.jar.sha1
new file mode 100644
index 00000000000..4ebcf3f6edc
--- /dev/null
+++ b/solr/licenses/lucene-sandbox-9.4.0.jar.sha1
@@ -0,0 +1 @@
+e7a676a12ea50dcbf64564f4e4022f939f0a627d
\ No newline at end of file
diff --git a/solr/licenses/lucene-spatial-extras-9.3.0.jar.sha1 b/solr/licenses/lucene-spatial-extras-9.3.0.jar.sha1
deleted file mode 100644
index 60d60b0d639..00000000000
--- a/solr/licenses/lucene-spatial-extras-9.3.0.jar.sha1
+++ /dev/null
@@ -1 +0,0 @@
-c9b226b49ae987a4226791f023562187583eb9ad
diff --git a/solr/licenses/lucene-spatial-extras-9.4.0.jar.sha1 b/solr/licenses/lucene-spatial-extras-9.4.0.jar.sha1
new file mode 100644
index 00000000000..c0f181ad19e
--- /dev/null
+++ b/solr/licenses/lucene-spatial-extras-9.4.0.jar.sha1
@@ -0,0 +1 @@
+84d956d1cb1458c51967af1c4acadd2a1f92634d
\ No newline at end of file
diff --git a/solr/licenses/lucene-spatial3d-9.3.0.jar.sha1 b/solr/licenses/lucene-spatial3d-9.3.0.jar.sha1
deleted file mode 100644
index 9148377cb3b..00000000000
--- a/solr/licenses/lucene-spatial3d-9.3.0.jar.sha1
+++ /dev/null
@@ -1 +0,0 @@
-201aa61856ae44fa494504591aed54fd9b75af16
diff --git a/solr/licenses/lucene-spatial3d-9.4.0.jar.sha1 b/solr/licenses/lucene-spatial3d-9.4.0.jar.sha1
new file mode 100644
index 00000000000..3414f36b02b
--- /dev/null
+++ b/solr/licenses/lucene-spatial3d-9.4.0.jar.sha1
@@ -0,0 +1 @@
+76887ca708f23b13613e45fb9e307c548b22c6da
\ No newline at end of file
diff --git a/solr/licenses/lucene-suggest-9.3.0.jar.sha1 b/solr/licenses/lucene-suggest-9.3.0.jar.sha1
deleted file mode 100644
index 341ccfb9844..00000000000
--- a/solr/licenses/lucene-suggest-9.3.0.jar.sha1
+++ /dev/null
@@ -1 +0,0 @@
-fb5d7243ba67616edbda1ecf421c615dd595752d
diff --git a/solr/licenses/lucene-suggest-9.4.0.jar.sha1 b/solr/licenses/lucene-suggest-9.4.0.jar.sha1
new file mode 100644
index 00000000000..563a0b5ad96
--- /dev/null
+++ b/solr/licenses/lucene-suggest-9.4.0.jar.sha1
@@ -0,0 +1 @@
+406c9c539f262449d3b1e57e7bc4302efeecaf6c
\ No newline at end of file
diff --git a/solr/licenses/lucene-test-framework-9.3.0.jar.sha1 b/solr/licenses/lucene-test-framework-9.3.0.jar.sha1
deleted file mode 100644
index c546120df73..00000000000
--- a/solr/licenses/lucene-test-framework-9.3.0.jar.sha1
+++ /dev/null
@@ -1 +0,0 @@
-8fa33b8df96e99233afa3475eb9de1d3b302cc4e
diff --git a/solr/licenses/lucene-test-framework-9.4.0.jar.sha1 b/solr/licenses/lucene-test-framework-9.4.0.jar.sha1
new file mode 100644
index 00000000000..cf3a5111ca8
--- /dev/null
+++ b/solr/licenses/lucene-test-framework-9.4.0.jar.sha1
@@ -0,0 +1 @@
+5f13400741a511fd4ba48e64d5637fb0a8b1bd7a
\ No newline at end of file
diff --git a/solr/server/solr/configsets/_default/conf/solrconfig.xml b/solr/server/solr/configsets/_default/conf/solrconfig.xml
index 3642233488e..123c93d168c 100644
--- a/solr/server/solr/configsets/_default/conf/solrconfig.xml
+++ b/solr/server/solr/configsets/_default/conf/solrconfig.xml
@@ -35,7 +35,7 @@
that you fully re-index after changing this setting as it can
affect both how text is indexed and queried.
-->
- <luceneMatchVersion>9.3</luceneMatchVersion>
+ <luceneMatchVersion>9.4</luceneMatchVersion>
<!-- <lib/> directives can be used to instruct Solr to load any Jars
identified and use them to resolve any "plugins" specified in
diff --git a/solr/server/solr/configsets/sample_techproducts_configs/conf/solrconfig.xml b/solr/server/solr/configsets/sample_techproducts_configs/conf/solrconfig.xml
index c5ce421e7fe..d7cc03b8803 100644
--- a/solr/server/solr/configsets/sample_techproducts_configs/conf/solrconfig.xml
+++ b/solr/server/solr/configsets/sample_techproducts_configs/conf/solrconfig.xml
@@ -35,7 +35,7 @@
that you fully re-index after changing this setting as it can
affect both how text is indexed and queried.
-->
- <luceneMatchVersion>9.3</luceneMatchVersion>
+ <luceneMatchVersion>9.4</luceneMatchVersion>
<!-- <lib/> directives can be used to instruct Solr to load any Jars
identified and use them to resolve any "plugins" specified in
diff --git a/solr/solr-ref-guide/antora.yml b/solr/solr-ref-guide/antora.yml
index 926c76a1088..32e25b73cd9 100644
--- a/solr/solr-ref-guide/antora.yml
+++ b/solr/solr-ref-guide/antora.yml
@@ -35,7 +35,7 @@ asciidoc:
# 'patch-version' is the 'z' part of x.y.z semantic version
page-solr-javadocs: 'https://solr.apache.org/docs/10_0_0'
solr-javadocs: 'https://solr.apache.org/docs/10_0_0'
- lucene-javadocs: 'https://lucene.apache.org/core/9_3_0'
+ lucene-javadocs: 'https://lucene.apache.org/core/9_4_0'
java-javadocs: https://docs.oracle.com/en/java/javase/11/docs/api/java.base/
# Some constructed links may be 404 TODO to check
solr-docs-version: '10.0'
diff --git a/solr/test-framework/src/java/org/apache/solr/schema/SortableBinaryField.java b/solr/test-framework/src/java/org/apache/solr/schema/SortableBinaryField.java
index 8a6e366932c..30589f02343 100644
--- a/solr/test-framework/src/java/org/apache/solr/schema/SortableBinaryField.java
+++ b/solr/test-framework/src/java/org/apache/solr/schema/SortableBinaryField.java
@@ -23,9 +23,9 @@ import java.util.List;
import org.apache.lucene.document.SortedDocValuesField;
import org.apache.lucene.document.SortedSetDocValuesField;
import org.apache.lucene.index.IndexableField;
-import org.apache.lucene.search.FieldComparator;
import org.apache.lucene.search.FieldComparatorSource;
import org.apache.lucene.search.SortField;
+import org.apache.lucene.search.comparators.TermOrdValComparator;
import org.apache.lucene.util.BytesRef;
/** Custom field representing a {@link BinaryField} that's sortable. */
@@ -70,12 +70,14 @@ public class SortableBinaryField extends BinaryField {
field,
new FieldComparatorSource() {
@Override
- public FieldComparator.TermOrdValComparator newComparator(
+ public TermOrdValComparator newComparator(
final String fieldname,
final int numHits,
final boolean enableSkipping,
final boolean reversed) {
- return new FieldComparator.TermOrdValComparator(numHits, fieldname);
+ final boolean sortMissingLast = false;
+ return new TermOrdValComparator(
+ numHits, fieldname, sortMissingLast, reversed, enableSkipping);
}
},
reverse);
diff --git a/versions.lock b/versions.lock
index de60bd41e40..2ac96a16d98 100644
--- a/versions.lock
+++ b/versions.lock
@@ -2,7 +2,7 @@
com.adobe.xmp:xmpcore:6.1.10 (1 constraints: fd0d5947)
com.beust:jcommander:1.82 (2 constraints: 2b123714)
com.carrotsearch:hppc:0.9.1 (2 constraints: ad0fc9a6)
-com.carrotsearch.randomizedtesting:randomizedtesting-runner:2.8.1 (2 constraints: ce1500e2)
+com.carrotsearch.randomizedtesting:randomizedtesting-runner:2.8.1 (2 constraints: cf1501e2)
com.cybozu.labs:langdetect:1.1-20120112 (1 constraints: 5c066d5e)
com.epam:parso:2.0.14 (1 constraints: 8e0c750e)
com.fasterxml.jackson:jackson-bom:2.13.3 (12 constraints: 42f8e444)
@@ -163,32 +163,32 @@ org.apache.logging.log4j:log4j-core:2.17.2 (5 constraints: 6f55c3ab)
org.apache.logging.log4j:log4j-layout-template-json:2.17.2 (1 constraints: 3e05463b)
org.apache.logging.log4j:log4j-slf4j-impl:2.17.2 (1 constraints: 3e05463b)
org.apache.logging.log4j:log4j-web:2.17.2 (1 constraints: 3e05463b)
-org.apache.lucene:lucene-analysis-common:9.3.0 (10 constraints: ca9e4c49)
-org.apache.lucene:lucene-analysis-icu:9.3.0 (1 constraints: 0e052136)
-org.apache.lucene:lucene-analysis-kuromoji:9.3.0 (1 constraints: 0e052136)
-org.apache.lucene:lucene-analysis-morfologik:9.3.0 (1 constraints: 0e052136)
-org.apache.lucene:lucene-analysis-nori:9.3.0 (1 constraints: 0e052136)
-org.apache.lucene:lucene-analysis-opennlp:9.3.0 (1 constraints: 0e052136)
-org.apache.lucene:lucene-analysis-phonetic:9.3.0 (1 constraints: 0e052136)
-org.apache.lucene:lucene-analysis-smartcn:9.3.0 (1 constraints: 0e052136)
-org.apache.lucene:lucene-analysis-stempel:9.3.0 (1 constraints: 0e052136)
-org.apache.lucene:lucene-backward-codecs:9.3.0 (1 constraints: 0e052136)
-org.apache.lucene:lucene-classification:9.3.0 (1 constraints: 0e052136)
-org.apache.lucene:lucene-codecs:9.3.0 (3 constraints: 9c25dc42)
-org.apache.lucene:lucene-core:9.3.0 (26 constraints: e18f18f4)
-org.apache.lucene:lucene-expressions:9.3.0 (1 constraints: 0e052136)
-org.apache.lucene:lucene-grouping:9.3.0 (2 constraints: e215b8e3)
-org.apache.lucene:lucene-highlighter:9.3.0 (1 constraints: 0e052136)
-org.apache.lucene:lucene-join:9.3.0 (1 constraints: 0e052136)
-org.apache.lucene:lucene-memory:9.3.0 (1 constraints: 980fa883)
-org.apache.lucene:lucene-misc:9.3.0 (1 constraints: 0e052136)
-org.apache.lucene:lucene-queries:9.3.0 (6 constraints: ae510e74)
-org.apache.lucene:lucene-queryparser:9.3.0 (1 constraints: 0e052136)
-org.apache.lucene:lucene-sandbox:9.3.0 (2 constraints: d9149aa0)
-org.apache.lucene:lucene-spatial-extras:9.3.0 (1 constraints: 0e052136)
-org.apache.lucene:lucene-spatial3d:9.3.0 (1 constraints: bb10b0b9)
-org.apache.lucene:lucene-suggest:9.3.0 (1 constraints: 0e052136)
-org.apache.lucene:lucene-test-framework:9.3.0 (1 constraints: 0e052136)
+org.apache.lucene:lucene-analysis-common:9.4.0 (10 constraints: d49ee451)
+org.apache.lucene:lucene-analysis-icu:9.4.0 (1 constraints: 0f052436)
+org.apache.lucene:lucene-analysis-kuromoji:9.4.0 (1 constraints: 0f052436)
+org.apache.lucene:lucene-analysis-morfologik:9.4.0 (1 constraints: 0f052436)
+org.apache.lucene:lucene-analysis-nori:9.4.0 (1 constraints: 0f052436)
+org.apache.lucene:lucene-analysis-opennlp:9.4.0 (1 constraints: 0f052436)
+org.apache.lucene:lucene-analysis-phonetic:9.4.0 (1 constraints: 0f052436)
+org.apache.lucene:lucene-analysis-smartcn:9.4.0 (1 constraints: 0f052436)
+org.apache.lucene:lucene-analysis-stempel:9.4.0 (1 constraints: 0f052436)
+org.apache.lucene:lucene-backward-codecs:9.4.0 (1 constraints: 0f052436)
+org.apache.lucene:lucene-classification:9.4.0 (1 constraints: 0f052436)
+org.apache.lucene:lucene-codecs:9.4.0 (3 constraints: 9f257243)
+org.apache.lucene:lucene-core:9.4.0 (26 constraints: fb8f742c)
+org.apache.lucene:lucene-expressions:9.4.0 (1 constraints: 0f052436)
+org.apache.lucene:lucene-grouping:9.4.0 (2 constraints: e415eee3)
+org.apache.lucene:lucene-highlighter:9.4.0 (1 constraints: 0f052436)
+org.apache.lucene:lucene-join:9.4.0 (1 constraints: 0f052436)
+org.apache.lucene:lucene-memory:9.4.0 (1 constraints: 990fab83)
+org.apache.lucene:lucene-misc:9.4.0 (1 constraints: 0f052436)
+org.apache.lucene:lucene-queries:9.4.0 (6 constraints: b451ac76)
+org.apache.lucene:lucene-queryparser:9.4.0 (1 constraints: 0f052436)
+org.apache.lucene:lucene-sandbox:9.4.0 (2 constraints: db14cda0)
+org.apache.lucene:lucene-spatial-extras:9.4.0 (1 constraints: 0f052436)
+org.apache.lucene:lucene-spatial3d:9.4.0 (1 constraints: bc10b3b9)
+org.apache.lucene:lucene-suggest:9.4.0 (1 constraints: 0f052436)
+org.apache.lucene:lucene-test-framework:9.4.0 (1 constraints: 0f052436)
org.apache.opennlp:opennlp-tools:1.9.4 (3 constraints: 0823a25b)
org.apache.pdfbox:fontbox:2.0.26 (1 constraints: 180b72d8)
org.apache.pdfbox:jbig2-imageio:3.0.4 (1 constraints: 5e0cef01)
diff --git a/versions.props b/versions.props
index 56b103d478d..66f5fb3b8dc 100644
--- a/versions.props
+++ b/versions.props
@@ -49,7 +49,7 @@ org.apache.httpcomponents:httpcore=4.4.15
org.apache.httpcomponents:httpmime=4.5.13
org.apache.kerby:*=1.0.1
org.apache.logging.log4j:*=2.17.2
-org.apache.lucene:*=9.3.0
+org.apache.lucene:*=9.4.0
org.apache.opennlp:opennlp-tools=1.9.4
org.apache.tika:*=1.28.4
org.apache.zookeeper:*=3.8.0