You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@solr.apache.org by ma...@apache.org on 2025/09/03 18:47:10 UTC
(solr) 01/01: Upgrade to Lucene 10.2.2
This is an automated email from the ASF dual-hosted git repository.
markrmiller pushed a commit to branch mrm/upgrade-to-lucene-10
in repository https://gitbox.apache.org/repos/asf/solr.git
commit 1c1252d49439ba6371673fd56ba040ccf2836c7e
Author: Mark Miller <ma...@gmail.com>
AuthorDate: Thu Aug 28 11:58:22 2025 -0500
Upgrade to Lucene 10.2.2
---
gradle/libs.versions.toml | 10 +-
gradle/wrapper/gradle-wrapper.properties | 2 +-
solr/api/gradle.lockfile | 49 ++-
solr/benchmark/gradle.lockfile | 50 +--
solr/core/gradle.lockfile | 64 +--
.../org/apache/solr/blockcache/BlockDirectory.java | 38 +-
.../java/org/apache/solr/core/CoreContainer.java | 4 -
.../org/apache/solr/core/MMapDirectoryFactory.java | 8 +-
.../org/apache/solr/core/SchemaCodecFactory.java | 6 +-
.../src/java/org/apache/solr/core/SolrConfig.java | 5 +-
.../src/java/org/apache/solr/core/SolrCore.java | 12 +-
.../core/backup/repository/BackupRepository.java | 4 +-
.../org/apache/solr/handler/AnalyzeEvaluator.java | 2 +-
.../java/org/apache/solr/handler/BlobHandler.java | 4 +-
.../org/apache/solr/handler/ClassifyStream.java | 2 +-
.../handler/DocumentAnalysisRequestHandler.java | 2 +-
.../apache/solr/handler/MoreLikeThisHandler.java | 8 +-
.../solr/handler/admin/api/GetSegmentData.java | 14 +-
.../solr/handler/component/ExpandComponent.java | 19 +-
.../solr/handler/component/FacetComponent.java | 15 +-
.../solr/handler/component/PivotFacetValue.java | 5 +-
.../solr/handler/component/QueryComponent.java | 16 +-
.../handler/component/QueryElevationComponent.java | 2 +-
.../handler/component/RealTimeGetComponent.java | 2 +-
.../solr/handler/component/SearchHandler.java | 2 +-
.../org/apache/solr/handler/loader/JsonLoader.java | 2 +-
.../org/apache/solr/handler/loader/XMLLoader.java | 4 +-
.../solr/handler/tagger/TermPrefixCursor.java | 2 +-
.../solr/index/SlowCompositeReaderWrapper.java | 19 +-
.../org/apache/solr/internal/csv/CSVPrinter.java | 2 +-
.../java/org/apache/solr/legacy/LegacyField.java | 12 +-
.../solr/legacy/LegacyNumericRangeQuery.java | 75 ++++
.../java/org/apache/solr/parser/QueryParser.java | 4 +-
.../src/java/org/apache/solr/parser/QueryParser.jj | 4 +-
.../apache/solr/parser/QueryParserConstants.java | 1 -
.../apache/solr/parser/SolrQueryParserBase.java | 51 ++-
.../java/org/apache/solr/query/FilterQuery.java | 5 +-
.../java/org/apache/solr/query/SolrRangeQuery.java | 62 ++-
.../org/apache/solr/request/DocValuesFacets.java | 14 +-
.../org/apache/solr/request/DocValuesStats.java | 4 +-
.../org/apache/solr/request/IntervalFacets.java | 82 ++--
.../java/org/apache/solr/request/SimpleFacets.java | 20 +-
.../org/apache/solr/response/SchemaXmlWriter.java | 24 +-
.../transform/ChildDocTransformerFactory.java | 5 +-
.../response/transform/ValueSourceAugmenter.java | 6 -
.../solr/schema/AbstractSpatialFieldType.java | 5 +-
.../src/java/org/apache/solr/schema/BBoxField.java | 2 +-
.../org/apache/solr/schema/CurrencyFieldType.java | 4 +-
.../src/java/org/apache/solr/schema/FieldType.java | 14 +-
.../apache/solr/schema/FieldTypePluginLoader.java | 8 -
.../org/apache/solr/schema/PreAnalyzedField.java | 170 +++++---
.../java/org/apache/solr/schema/SchemaField.java | 6 +
.../src/java/org/apache/solr/schema/TextField.java | 136 ++++++-
.../apache/solr/search/AbstractReRankQuery.java | 7 +-
.../solr/search/CollapsingQParserPlugin.java | 4 +-
.../solr/search/ComplexPhraseQParserPlugin.java | 39 +-
.../org/apache/solr/search/DocSetCollector.java | 38 +-
.../java/org/apache/solr/search/DocSetQuery.java | 16 +-
.../java/org/apache/solr/search/DocSetUtil.java | 74 +++-
.../solr/search/EarlyTerminatingCollector.java | 2 +-
.../search/EarlyTerminatingSortingCollector.java | 2 +-
.../apache/solr/search/ExportQParserPlugin.java | 7 +-
.../apache/solr/search/ExtendedDismaxQParser.java | 24 +-
.../org/apache/solr/search/FunctionRangeQuery.java | 1 -
.../solr/search/GraphTermsQParserPlugin.java | 57 ++-
.../src/java/org/apache/solr/search/Grouping.java | 77 ++--
.../src/java/org/apache/solr/search/JoinQuery.java | 28 +-
.../org/apache/solr/search/MatchCostQuery.java | 90 +++--
.../apache/solr/search/MultiThreadedSearcher.java | 3 +-
.../solr/search/NumericHidingLeafReader.java | 7 +-
.../src/java/org/apache/solr/search/QParser.java | 4 +-
.../java/org/apache/solr/search/QueryParsing.java | 2 +-
.../java/org/apache/solr/search/QueryUtils.java | 4 +-
.../org/apache/solr/search/ReRankCollector.java | 15 +-
.../apache/solr/search/SolrDocumentFetcher.java | 7 +-
.../org/apache/solr/search/SolrIndexSearcher.java | 192 ++++++---
.../org/apache/solr/search/TermsQParserPlugin.java | 64 +--
.../org/apache/solr/search/TopLevelJoinQuery.java | 64 +--
.../java/org/apache/solr/search/WrappedQuery.java | 5 +-
.../java/org/apache/solr/search/facet/AvgAgg.java | 4 +-
.../org/apache/solr/search/facet/CountValsAgg.java | 4 +-
.../org/apache/solr/search/facet/DocValuesAcc.java | 3 +-
.../search/facet/FacetFieldProcessorByArrayDV.java | 9 +-
.../FacetFieldProcessorByEnumTermsStream.java | 4 +-
.../org/apache/solr/search/facet/FacetHeatmap.java | 10 +-
.../org/apache/solr/search/facet/MinMaxAgg.java | 7 +-
.../org/apache/solr/search/facet/MissingAgg.java | 4 +-
.../apache/solr/search/facet/PercentileAgg.java | 3 +-
.../java/org/apache/solr/search/facet/SumAgg.java | 4 +-
.../org/apache/solr/search/facet/SumsqAgg.java | 4 +-
.../solr/search/facet/UniqueMultiDvSlotAcc.java | 9 +-
.../search/function/ValueSourceRangeFilter.java | 21 +-
.../solr/search/grouping/CommandHandler.java | 20 +-
.../distributed/command/GroupConverter.java | 14 +-
.../grouping/distributed/command/QueryCommand.java | 9 +-
.../distributed/command/TopGroupsFieldCommand.java | 2 +-
.../StoredFieldsShardRequestFactory.java | 2 +-
.../TopGroupsShardResponseProcessor.java | 4 +-
.../TopGroupsResultTransformer.java | 26 +-
.../GroupedEndResultTransformer.java | 21 +-
.../MainEndResultTransformer.java | 4 +-
.../SimpleEndResultTransformer.java | 4 +-
.../solr/search/join/BlockJoinParentQParser.java | 16 +-
.../solr/search/join/CrossCollectionJoinQuery.java | 17 +-
.../solr/search/join/GraphEdgeCollector.java | 8 +-
.../org/apache/solr/search/join/GraphQuery.java | 46 ++-
.../apache/solr/search/join/HashRangeQuery.java | 49 ++-
.../join/MultiValueTermOrdinalCollector.java | 4 +-
.../solr/search/join/ScoreJoinQParserPlugin.java | 4 +-
.../apache/solr/search/mlt/AbstractMLTQParser.java | 9 +-
.../apache/solr/search/mlt/SimpleMLTQParser.java | 2 +-
.../java/org/apache/solr/servlet/ServletUtils.java | 38 +-
.../apache/solr/servlet/SolrRequestParsers.java | 2 +-
.../solr/spelling/WordBreakSolrSpellChecker.java | 7 +-
.../org/apache/solr/uninverting/DocTermOrds.java | 52 ++-
.../apache/solr/uninverting/FieldCacheImpl.java | 17 +-
.../apache/solr/uninverting/UninvertingReader.java | 4 +-
.../apache/solr/update/DeleteByQueryWrapper.java | 27 +-
.../org/apache/solr/update/SolrIndexConfig.java | 5 +-
.../org/apache/solr/update/SolrIndexSplitter.java | 18 +-
.../processor/ClassificationUpdateProcessor.java | 2 +-
.../PreAnalyzedUpdateProcessorFactory.java | 22 +-
.../java/org/apache/solr/util/SolrPluginUtils.java | 8 +-
.../solr/collection1/conf/schema_codec.xml | 2 +-
.../apache/solr/TestHighlightDedupGrouping.java | 8 -
.../apache/solr/blockcache/BlockDirectoryTest.java | 11 +-
.../solr/cloud/TestLeaderElectionZkExpiry.java | 4 +-
.../org/apache/solr/core/TestCodecSupport.java | 18 +-
.../apache/solr/core/TestQuerySenderNoQuery.java | 3 +-
.../solr/handler/TestReplicationHandlerBackup.java | 2 +-
.../solr/handler/TestSnapshotCoreBackup.java | 3 +-
.../solr/handler/TestStressThreadBackup.java | 3 +-
.../component/QueryElevationComponentTest.java | 10 +-
.../org/apache/solr/legacy/TestLegacyField.java | 2 +-
.../legacy/TestMultiValuedNumericRangeQuery.java | 12 +-
.../solr/legacy/TestNumericRangeQuery32.java | 57 ++-
.../solr/legacy/TestNumericRangeQuery64.java | 52 ++-
.../org/apache/solr/schema/DocValuesMultiTest.java | 6 +-
.../org/apache/solr/schema/MyCrazyCustomField.java | 4 +-
.../apache/solr/schema/PreAnalyzedFieldTest.java | 49 ++-
.../apache/solr/search/MaxScoreCollectorTest.java | 5 -
.../apache/solr/search/RankQueryTestPlugin.java | 5 -
.../solr/search/TestCancellableCollector.java | 7 +-
.../apache/solr/search/TestCpuAllowedLimit.java | 11 +-
.../test/org/apache/solr/search/TestDocSet.java | 8 +-
.../solr/search/TestEarlyTerminatingQueries.java | 3 +-
.../solr/search/TestExtendedDismaxParser.java | 6 +-
.../apache/solr/search/TestFilteredDocIdSet.java | 12 +-
.../solr/search/TestMaxScoreQueryParser.java | 36 +-
.../apache/solr/search/TestMemAllowedLimit.java | 3 +-
.../org/apache/solr/search/TestMinHashQParser.java | 2 +-
.../org/apache/solr/search/TestQueryLimits.java | 3 +-
.../org/apache/solr/search/TestSolrCoreParser.java | 10 +-
.../apache/solr/search/TestSolrQueryParser.java | 53 +--
.../src/test/org/apache/solr/search/TestSort.java | 8 +-
.../apache/solr/search/function/TestOrdValues.java | 4 +-
.../org/apache/solr/search/join/BJQParserTest.java | 2 +-
.../solr/search/join/TestScoreJoinQPNoScore.java | 4 +-
.../solr/search/join/TestScoreJoinQPScore.java | 4 +-
.../join/another/BJQFilterAccessibleTest.java | 10 +-
.../apache/solr/uninverting/TestDocTermOrds.java | 35 +-
.../apache/solr/uninverting/TestFieldCache.java | 43 +-
.../solr/uninverting/TestFieldCacheSort.java | 118 +++---
.../solr/uninverting/TestFieldCacheSortRandom.java | 88 ++--
.../uninverting/TestFieldCacheVsDocValues.java | 14 +-
.../solr/uninverting/TestNumericTerms32.java | 2 +-
.../solr/uninverting/TestNumericTerms64.java | 2 +-
.../solr/uninverting/TestUninvertingReader.java | 8 -
.../org/apache/solr/update/AddBlockUpdateTest.java | 4 +-
.../apache/solr/update/SolrIndexConfigTest.java | 2 +-
.../TimeRoutedAliasUpdateProcessorTest.java | 2 +-
.../org/apache/solr/util/SolrPluginUtilsTest.java | 8 +-
solr/cross-dc-manager/gradle.lockfile | 49 ++-
solr/documentation/gradle.lockfile | 14 +-
solr/licenses/antlr4-runtime-4.11.1.jar.sha1 | 1 -
solr/licenses/antlr4-runtime-4.13.2.jar.sha1 | 1 +
solr/licenses/commons-codec-1.17.2.jar.sha1 | 1 +
solr/licenses/icu4j-74.2.jar.sha1 | 1 -
solr/licenses/icu4j-77.1.jar.sha1 | 1 +
.../lucene-analysis-common-10.2.2.jar.sha1 | 1 +
.../lucene-analysis-common-9.12.2.jar.sha1 | 1 -
solr/licenses/lucene-analysis-icu-10.2.2.jar.sha1 | 1 +
solr/licenses/lucene-analysis-icu-9.12.2.jar.sha1 | 1 -
.../lucene-analysis-kuromoji-10.2.2.jar.sha1 | 1 +
.../lucene-analysis-kuromoji-9.12.2.jar.sha1 | 1 -
.../lucene-analysis-morfologik-10.2.2.jar.sha1 | 1 +
.../lucene-analysis-morfologik-9.12.2.jar.sha1 | 1 -
solr/licenses/lucene-analysis-nori-10.2.2.jar.sha1 | 1 +
solr/licenses/lucene-analysis-nori-9.12.2.jar.sha1 | 1 -
.../lucene-analysis-opennlp-10.2.2.jar.sha1 | 1 +
.../lucene-analysis-opennlp-9.12.2.jar.sha1 | 1 -
.../lucene-analysis-phonetic-10.2.2.jar.sha1 | 1 +
.../lucene-analysis-phonetic-9.12.2.jar.sha1 | 1 -
.../lucene-analysis-smartcn-10.2.2.jar.sha1 | 1 +
.../lucene-analysis-smartcn-9.12.2.jar.sha1 | 1 -
.../lucene-analysis-stempel-10.2.2.jar.sha1 | 1 +
.../lucene-analysis-stempel-9.12.2.jar.sha1 | 1 -
.../lucene-backward-codecs-10.2.2.jar.sha1 | 1 +
.../lucene-backward-codecs-9.12.2.jar.sha1 | 1 -
.../licenses/lucene-classification-10.2.2.jar.sha1 | 1 +
.../licenses/lucene-classification-9.12.2.jar.sha1 | 1 -
solr/licenses/lucene-codecs-10.2.2.jar.sha1 | 1 +
solr/licenses/lucene-codecs-9.12.2.jar.sha1 | 1 -
solr/licenses/lucene-core-10.2.2.jar.sha1 | 1 +
solr/licenses/lucene-core-9.12.2.jar.sha1 | 1 -
solr/licenses/lucene-expressions-10.2.2.jar.sha1 | 1 +
solr/licenses/lucene-expressions-9.12.2.jar.sha1 | 1 -
solr/licenses/lucene-facet-10.2.2.jar.sha1 | 1 +
solr/licenses/lucene-facet-9.12.2.jar.sha1 | 1 -
solr/licenses/lucene-grouping-10.2.2.jar.sha1 | 1 +
solr/licenses/lucene-grouping-9.12.2.jar.sha1 | 1 -
solr/licenses/lucene-highlighter-10.2.2.jar.sha1 | 1 +
solr/licenses/lucene-highlighter-9.12.2.jar.sha1 | 1 -
solr/licenses/lucene-join-10.2.2.jar.sha1 | 1 +
solr/licenses/lucene-join-9.12.2.jar.sha1 | 1 -
solr/licenses/lucene-memory-10.2.2.jar.sha1 | 1 +
solr/licenses/lucene-memory-9.12.2.jar.sha1 | 1 -
solr/licenses/lucene-misc-10.2.2.jar.sha1 | 1 +
solr/licenses/lucene-misc-9.12.2.jar.sha1 | 1 -
solr/licenses/lucene-queries-10.2.2.jar.sha1 | 1 +
solr/licenses/lucene-queries-9.12.2.jar.sha1 | 1 -
solr/licenses/lucene-queryparser-10.2.2.jar.sha1 | 1 +
solr/licenses/lucene-queryparser-9.12.2.jar.sha1 | 1 -
solr/licenses/lucene-sandbox-10.2.2.jar.sha1 | 1 +
solr/licenses/lucene-sandbox-9.12.2.jar.sha1 | 1 -
.../licenses/lucene-spatial-extras-10.2.2.jar.sha1 | 1 +
.../licenses/lucene-spatial-extras-9.12.2.jar.sha1 | 1 -
solr/licenses/lucene-spatial3d-10.2.2.jar.sha1 | 1 +
solr/licenses/lucene-spatial3d-9.12.2.jar.sha1 | 1 -
solr/licenses/lucene-suggest-10.2.2.jar.sha1 | 1 +
solr/licenses/lucene-suggest-9.12.2.jar.sha1 | 1 -
.../licenses/lucene-test-framework-10.2.2.jar.sha1 | 1 +
.../licenses/lucene-test-framework-9.12.2.jar.sha1 | 1 -
solr/licenses/opennlp-tools-2.5.3.jar.sha1 | 1 +
solr/modules/analysis-extras/gradle.lockfile | 63 ++-
.../solr/schema/TestICUCollationFieldUDVAS.java | 3 +-
solr/modules/clustering/gradle.lockfile | 49 ++-
solr/modules/cross-dc/gradle.lockfile | 49 ++-
solr/modules/extraction/gradle.lockfile | 52 +--
solr/modules/gcs-repository/gradle.lockfile | 50 +--
.../org/apache/solr/gcs/GCSBackupRepository.java | 2 +-
solr/modules/jwt-auth/gradle.lockfile | 50 +--
.../security/jwt/JWTAuthPluginIntegrationTest.java | 3 +-
solr/modules/langid/gradle.lockfile | 51 ++-
solr/modules/llm/gradle.lockfile | 49 ++-
.../model/SolrTextToVectorModel.java | 17 +-
solr/modules/ltr/gradle.lockfile | 49 ++-
.../src/java/org/apache/solr/ltr/LTRRescorer.java | 8 +-
.../java/org/apache/solr/ltr/LTRScoringQuery.java | 444 ++++++++++++---------
.../java/org/apache/solr/ltr/feature/Feature.java | 15 +-
.../solr/ltr/feature/FieldLengthFeature.java | 19 +-
.../apache/solr/ltr/feature/FieldValueFeature.java | 19 +-
.../solr/ltr/feature/OriginalScoreFeature.java | 17 +-
.../org/apache/solr/ltr/feature/SolrFeature.java | 28 +-
.../org/apache/solr/ltr/feature/ValueFeature.java | 28 +-
.../ltr/interleaving/LTRInterleavingRescorer.java | 5 +-
.../apache/solr/ltr/TestLTRReRankingPipeline.java | 16 +-
.../org/apache/solr/ltr/TestLTRScoringQuery.java | 2 +-
.../solr/ltr/TestSelectiveWeightCreation.java | 2 +-
.../solr/ltr/feature/TestFieldValueFeature.java | 4 +-
solr/modules/opentelemetry/gradle.lockfile | 49 ++-
solr/modules/s3-repository/gradle.lockfile | 50 +--
.../org/apache/solr/s3/S3BackupRepository.java | 2 +-
.../test/org/apache/solr/s3/S3ReadWriteTest.java | 6 +-
solr/modules/scripting/gradle.lockfile | 49 ++-
solr/modules/sql/gradle.lockfile | 63 ++-
.../org/apache/solr/handler/sql/SolrFilter.java | 10 +-
solr/prometheus-exporter/gradle.lockfile | 50 +--
solr/server/gradle.lockfile | 46 +--
.../configsets/_default/conf/managed-schema.xml | 2 +-
.../solr/configsets/_default/conf/solrconfig.xml | 2 +-
.../conf/managed-schema.xml | 2 +-
.../conf/solrconfig.xml | 2 +-
solr/solr-ref-guide/gradle.lockfile | 51 ++-
.../modules/indexing-guide/pages/tokenizers.adoc | 2 +
solr/solrj-streaming/gradle.lockfile | 50 +--
solr/solrj-zookeeper/gradle.lockfile | 50 +--
solr/solrj/gradle.lockfile | 50 +--
.../solr/client/solrj/impl/XMLResponseParser.java | 6 +-
.../solr/client/solrj/response/QueryResponse.java | 6 +-
.../java/org/apache/solr/common/util/DOMUtil.java | 26 +-
.../src/java/org/apache/solr/common/util/Hash.java | 4 +-
.../apache/solr/common/util/JsonTextWriter.java | 2 +-
solr/solrj/src/java/org/noggit/JSONParser.java | 2 +-
solr/solrj/src/java/org/noggit/JSONUtil.java | 2 +-
.../apache/solr/client/solrj/SolrExampleTests.java | 3 +-
solr/test-framework/gradle.lockfile | 50 +--
.../org/apache/solr/SolrIgnoredThreadsFilter.java | 4 -
.../collections/AbstractBackupRepositoryTest.java | 3 +-
.../org/apache/solr/embedded/JettySolrRunner.java | 3 +-
.../java/org/apache/solr/util/QueryMatchers.java | 10 +-
solr/ui/gradle.lockfile | 1 -
solr/webapp/gradle.lockfile | 47 ++-
293 files changed, 3076 insertions(+), 2084 deletions(-)
diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml
index 063b6f8d7f9..4689807e4e6 100644
--- a/gradle/libs.versions.toml
+++ b/gradle/libs.versions.toml
@@ -37,8 +37,8 @@ apache-httpcomponents-httpcore = "4.4.16"
apache-httpcomponents-httpmime = "4.5.14"
apache-kafka = "3.9.0"
apache-log4j = "2.21.0"
-apache-lucene = "9.12.2"
-apache-opennlp = "1.9.4"
+apache-lucene = "10.2.2"
+apache-opennlp = "2.5.3"
apache-poi = "5.2.2"
apache-rat = "0.15"
apache-tika = "1.28.5"
@@ -77,7 +77,7 @@ compose = "1.7.3"
cutterslade-analyze = "1.10.0"
cybozulabs-langdetect = "1.1-20120112"
decompose = "3.2.2"
-diffplug-spotless = "6.5.2"
+diffplug-spotless = "7.2.1"
dropwizard-metrics = "4.2.26"
eclipse-ecj = "3.39.0"
eclipse-jetty = "12.0.19"
@@ -106,11 +106,11 @@ google-guava = "33.1.0-jre"
# @keep for version alignment
google-j2objc = "3.0.0"
# @keep This is GJF version for spotless/ tidy.
-google-javaformat = "1.18.1"
+google-javaformat = "1.28.0"
# @keep for version alignment
google-protobuf = "3.25.3"
# @keep Gradle version to run the build
-gradle = "8.10"
+gradle = "8.14.3"
grpc = "1.65.1"
# @keep Gulp version used in ref-guide
gulp-cli = "2.3.0"
diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties
index 9355b415575..d4081da476b 100644
--- a/gradle/wrapper/gradle-wrapper.properties
+++ b/gradle/wrapper/gradle-wrapper.properties
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-8.10-bin.zip
+distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.3-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
diff --git a/solr/api/gradle.lockfile b/solr/api/gradle.lockfile
index 1dc8a8dce30..389e80d85de 100644
--- a/solr/api/gradle.lockfile
+++ b/solr/api/gradle.lockfile
@@ -35,7 +35,6 @@ com.google.errorprone:error_prone_annotations:2.31.0=annotationProcessor,errorpr
com.google.errorprone:error_prone_check_api:2.31.0=annotationProcessor,errorprone,testAnnotationProcessor
com.google.errorprone:error_prone_core:2.31.0=annotationProcessor,errorprone,testAnnotationProcessor
com.google.errorprone:error_prone_type_annotations:2.31.0=annotationProcessor,errorprone,testAnnotationProcessor
-com.google.errorprone:javac:9+181-r4173-1=errorproneJavac
com.google.guava:failureaccess:1.0.2=annotationProcessor,errorprone,jarValidation,testAnnotationProcessor,testCompileClasspath,testRuntimeClasspath
com.google.guava:guava:33.1.0-jre=annotationProcessor,errorprone,jarValidation,testAnnotationProcessor,testCompileClasspath,testRuntimeClasspath
com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava=annotationProcessor,errorprone,jarValidation,testAnnotationProcessor,testCompileClasspath,testRuntimeClasspath
@@ -46,7 +45,7 @@ com.jayway.jsonpath:json-path:2.9.0=jarValidation,testRuntimeClasspath
com.sun.activation:jakarta.activation:2.0.1=swaggerBuild
com.tdunning:t-digest:3.3=jarValidation,testRuntimeClasspath
commons-cli:commons-cli:1.9.0=jarValidation,testRuntimeClasspath
-commons-codec:commons-codec:1.17.1=jarValidation,testRuntimeClasspath
+commons-codec:commons-codec:1.17.2=jarValidation,testRuntimeClasspath
commons-io:commons-io:2.17.0=jarValidation,testCompileClasspath,testRuntimeClasspath
io.dropwizard.metrics:metrics-annotation:4.2.26=jarValidation,testRuntimeClasspath
io.dropwizard.metrics:metrics-core:4.2.26=jarValidation,testCompileClasspath,testRuntimeClasspath
@@ -97,7 +96,7 @@ javax.inject:javax.inject:1=annotationProcessor,errorprone,testAnnotationProcess
javax.servlet:javax.servlet-api:3.1.0=swaggerDeps
javax.ws.rs:javax.ws.rs-api:2.1=swaggerDeps
junit:junit:4.13.2=jarValidation,testCompileClasspath,testRuntimeClasspath
-org.antlr:antlr4-runtime:4.11.1=jarValidation,testRuntimeClasspath
+org.antlr:antlr4-runtime:4.13.2=jarValidation,testRuntimeClasspath
org.apache.commons:commons-exec:1.4.0=jarValidation,testRuntimeClasspath
org.apache.commons:commons-lang3:3.14.0=swaggerDeps
org.apache.commons:commons-lang3:3.15.0=jarValidation,swaggerBuild,testRuntimeClasspath
@@ -111,28 +110,28 @@ org.apache.httpcomponents:httpmime:4.5.14=jarValidation,testCompileClasspath,tes
org.apache.logging.log4j:log4j-api:2.21.0=jarValidation,testRuntimeClasspath
org.apache.logging.log4j:log4j-core:2.21.0=jarValidation,testRuntimeClasspath
org.apache.logging.log4j:log4j-slf4j2-impl:2.21.0=jarValidation,testRuntimeClasspath
-org.apache.lucene:lucene-analysis-common:9.12.2=jarValidation,testCompileClasspath,testRuntimeClasspath
-org.apache.lucene:lucene-analysis-kuromoji:9.12.2=jarValidation,testRuntimeClasspath
-org.apache.lucene:lucene-analysis-nori:9.12.2=jarValidation,testRuntimeClasspath
-org.apache.lucene:lucene-analysis-phonetic:9.12.2=jarValidation,testRuntimeClasspath
-org.apache.lucene:lucene-backward-codecs:9.12.2=jarValidation,testRuntimeClasspath
-org.apache.lucene:lucene-classification:9.12.2=jarValidation,testRuntimeClasspath
-org.apache.lucene:lucene-codecs:9.12.2=jarValidation,testRuntimeClasspath
-org.apache.lucene:lucene-core:9.12.2=jarValidation,testCompileClasspath,testRuntimeClasspath
-org.apache.lucene:lucene-expressions:9.12.2=jarValidation,testRuntimeClasspath
-org.apache.lucene:lucene-facet:9.12.2=jarValidation,testRuntimeClasspath
-org.apache.lucene:lucene-grouping:9.12.2=jarValidation,testRuntimeClasspath
-org.apache.lucene:lucene-highlighter:9.12.2=jarValidation,testRuntimeClasspath
-org.apache.lucene:lucene-join:9.12.2=jarValidation,testRuntimeClasspath
-org.apache.lucene:lucene-memory:9.12.2=jarValidation,testRuntimeClasspath
-org.apache.lucene:lucene-misc:9.12.2=jarValidation,testRuntimeClasspath
-org.apache.lucene:lucene-queries:9.12.2=jarValidation,testCompileClasspath,testRuntimeClasspath
-org.apache.lucene:lucene-queryparser:9.12.2=jarValidation,testRuntimeClasspath
-org.apache.lucene:lucene-sandbox:9.12.2=jarValidation,testRuntimeClasspath
-org.apache.lucene:lucene-spatial-extras:9.12.2=jarValidation,testRuntimeClasspath
-org.apache.lucene:lucene-spatial3d:9.12.2=jarValidation,testRuntimeClasspath
-org.apache.lucene:lucene-suggest:9.12.2=jarValidation,testRuntimeClasspath
-org.apache.lucene:lucene-test-framework:9.12.2=jarValidation,testCompileClasspath,testRuntimeClasspath
+org.apache.lucene:lucene-analysis-common:10.2.2=jarValidation,testCompileClasspath,testRuntimeClasspath
+org.apache.lucene:lucene-analysis-kuromoji:10.2.2=jarValidation,testRuntimeClasspath
+org.apache.lucene:lucene-analysis-nori:10.2.2=jarValidation,testRuntimeClasspath
+org.apache.lucene:lucene-analysis-phonetic:10.2.2=jarValidation,testRuntimeClasspath
+org.apache.lucene:lucene-backward-codecs:10.2.2=jarValidation,testRuntimeClasspath
+org.apache.lucene:lucene-classification:10.2.2=jarValidation,testRuntimeClasspath
+org.apache.lucene:lucene-codecs:10.2.2=jarValidation,testRuntimeClasspath
+org.apache.lucene:lucene-core:10.2.2=jarValidation,testCompileClasspath,testRuntimeClasspath
+org.apache.lucene:lucene-expressions:10.2.2=jarValidation,testRuntimeClasspath
+org.apache.lucene:lucene-facet:10.2.2=jarValidation,testRuntimeClasspath
+org.apache.lucene:lucene-grouping:10.2.2=jarValidation,testRuntimeClasspath
+org.apache.lucene:lucene-highlighter:10.2.2=jarValidation,testRuntimeClasspath
+org.apache.lucene:lucene-join:10.2.2=jarValidation,testRuntimeClasspath
+org.apache.lucene:lucene-memory:10.2.2=jarValidation,testRuntimeClasspath
+org.apache.lucene:lucene-misc:10.2.2=jarValidation,testRuntimeClasspath
+org.apache.lucene:lucene-queries:10.2.2=jarValidation,testCompileClasspath,testRuntimeClasspath
+org.apache.lucene:lucene-queryparser:10.2.2=jarValidation,testRuntimeClasspath
+org.apache.lucene:lucene-sandbox:10.2.2=jarValidation,testRuntimeClasspath
+org.apache.lucene:lucene-spatial-extras:10.2.2=jarValidation,testRuntimeClasspath
+org.apache.lucene:lucene-spatial3d:10.2.2=jarValidation,testRuntimeClasspath
+org.apache.lucene:lucene-suggest:10.2.2=jarValidation,testRuntimeClasspath
+org.apache.lucene:lucene-test-framework:10.2.2=jarValidation,testCompileClasspath,testRuntimeClasspath
org.apache.zookeeper:zookeeper-jute:3.9.3=jarValidation,testCompileClasspath,testRuntimeClasspath
org.apache.zookeeper:zookeeper:3.9.3=jarValidation,testCompileClasspath,testRuntimeClasspath
org.apiguardian:apiguardian-api:1.1.2=jarValidation,testRuntimeClasspath
diff --git a/solr/benchmark/gradle.lockfile b/solr/benchmark/gradle.lockfile
index bcc989891ae..dab70dd6cc4 100644
--- a/solr/benchmark/gradle.lockfile
+++ b/solr/benchmark/gradle.lockfile
@@ -22,7 +22,6 @@ com.google.errorprone:error_prone_annotations:2.31.0=annotationProcessor,compile
com.google.errorprone:error_prone_check_api:2.31.0=annotationProcessor,errorprone,testAnnotationProcessor
com.google.errorprone:error_prone_core:2.31.0=annotationProcessor,errorprone,testAnnotationProcessor
com.google.errorprone:error_prone_type_annotations:2.31.0=annotationProcessor,errorprone,testAnnotationProcessor
-com.google.errorprone:javac:9+181-r4173-1=errorproneJavac
com.google.guava:failureaccess:1.0.2=annotationProcessor,compileClasspath,errorprone,jarValidation,runtimeClasspath,testAnnotationProcessor,testCompileClasspath,testRuntimeClasspath
com.google.guava:guava:33.1.0-jre=annotationProcessor,compileClasspath,errorprone,jarValidation,runtimeClasspath,testAnnotationProcessor,testCompileClasspath,testRuntimeClasspath
com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava=annotationProcessor,compileClasspath,errorprone,jarValidation,runtimeClasspath,testAnnotationProcessor,testCompileClasspath,testRuntimeClasspath
@@ -33,7 +32,8 @@ com.jayway.jsonpath:json-path:2.9.0=jarValidation,runtimeClasspath,testRuntimeCl
com.lmax:disruptor:3.4.4=jarValidation,runtimeClasspath,testRuntimeClasspath
com.tdunning:t-digest:3.3=jarValidation,runtimeClasspath,testRuntimeClasspath
commons-cli:commons-cli:1.9.0=jarValidation,runtimeClasspath,testRuntimeClasspath
-commons-codec:commons-codec:1.17.1=compileClasspath,jarValidation,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
+commons-codec:commons-codec:1.17.1=compileClasspath,testCompileClasspath
+commons-codec:commons-codec:1.17.2=jarValidation,runtimeClasspath,testRuntimeClasspath
commons-io:commons-io:2.17.0=compileClasspath,jarValidation,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
io.dropwizard.metrics:metrics-annotation:4.2.26=jarValidation,runtimeClasspath,testRuntimeClasspath
io.dropwizard.metrics:metrics-core:4.2.26=compileClasspath,jarValidation,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
@@ -69,7 +69,7 @@ jakarta.ws.rs:jakarta.ws.rs-api:3.1.0=jarValidation,runtimeClasspath,testRuntime
javax.inject:javax.inject:1=annotationProcessor,errorprone,testAnnotationProcessor
junit:junit:4.13.2=compileClasspath,jarValidation,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
net.sf.jopt-simple:jopt-simple:5.0.4=annotationProcessor,compileClasspath,jarValidation,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
-org.antlr:antlr4-runtime:4.11.1=jarValidation,runtimeClasspath,testRuntimeClasspath
+org.antlr:antlr4-runtime:4.13.2=jarValidation,runtimeClasspath,testRuntimeClasspath
org.apache.commons:commons-exec:1.4.0=jarValidation,runtimeClasspath,testRuntimeClasspath
org.apache.commons:commons-lang3:3.15.0=jarValidation,runtimeClasspath,testRuntimeClasspath
org.apache.commons:commons-math3:3.6.1=annotationProcessor,compileClasspath,jarValidation,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
@@ -82,28 +82,28 @@ org.apache.httpcomponents:httpmime:4.5.14=compileClasspath,jarValidation,runtime
org.apache.logging.log4j:log4j-api:2.21.0=jarValidation,runtimeClasspath,testRuntimeClasspath
org.apache.logging.log4j:log4j-core:2.21.0=jarValidation,runtimeClasspath,testRuntimeClasspath
org.apache.logging.log4j:log4j-slf4j2-impl:2.21.0=jarValidation,runtimeClasspath,testRuntimeClasspath
-org.apache.lucene:lucene-analysis-common:9.12.2=compileClasspath,jarValidation,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
-org.apache.lucene:lucene-analysis-kuromoji:9.12.2=jarValidation,runtimeClasspath,testRuntimeClasspath
-org.apache.lucene:lucene-analysis-nori:9.12.2=jarValidation,runtimeClasspath,testRuntimeClasspath
-org.apache.lucene:lucene-analysis-phonetic:9.12.2=jarValidation,runtimeClasspath,testRuntimeClasspath
-org.apache.lucene:lucene-backward-codecs:9.12.2=jarValidation,runtimeClasspath,testRuntimeClasspath
-org.apache.lucene:lucene-classification:9.12.2=jarValidation,runtimeClasspath,testRuntimeClasspath
-org.apache.lucene:lucene-codecs:9.12.2=jarValidation,runtimeClasspath,testRuntimeClasspath
-org.apache.lucene:lucene-core:9.12.2=compileClasspath,jarValidation,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
-org.apache.lucene:lucene-expressions:9.12.2=jarValidation,runtimeClasspath,testRuntimeClasspath
-org.apache.lucene:lucene-facet:9.12.2=jarValidation,runtimeClasspath,testRuntimeClasspath
-org.apache.lucene:lucene-grouping:9.12.2=jarValidation,runtimeClasspath,testRuntimeClasspath
-org.apache.lucene:lucene-highlighter:9.12.2=jarValidation,runtimeClasspath,testRuntimeClasspath
-org.apache.lucene:lucene-join:9.12.2=jarValidation,runtimeClasspath,testRuntimeClasspath
-org.apache.lucene:lucene-memory:9.12.2=jarValidation,runtimeClasspath,testRuntimeClasspath
-org.apache.lucene:lucene-misc:9.12.2=jarValidation,runtimeClasspath,testRuntimeClasspath
-org.apache.lucene:lucene-queries:9.12.2=compileClasspath,jarValidation,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
-org.apache.lucene:lucene-queryparser:9.12.2=jarValidation,runtimeClasspath,testRuntimeClasspath
-org.apache.lucene:lucene-sandbox:9.12.2=jarValidation,runtimeClasspath,testRuntimeClasspath
-org.apache.lucene:lucene-spatial-extras:9.12.2=jarValidation,runtimeClasspath,testRuntimeClasspath
-org.apache.lucene:lucene-spatial3d:9.12.2=jarValidation,runtimeClasspath,testRuntimeClasspath
-org.apache.lucene:lucene-suggest:9.12.2=jarValidation,runtimeClasspath,testRuntimeClasspath
-org.apache.lucene:lucene-test-framework:9.12.2=compileClasspath,jarValidation,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
+org.apache.lucene:lucene-analysis-common:10.2.2=compileClasspath,jarValidation,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
+org.apache.lucene:lucene-analysis-kuromoji:10.2.2=jarValidation,runtimeClasspath,testRuntimeClasspath
+org.apache.lucene:lucene-analysis-nori:10.2.2=jarValidation,runtimeClasspath,testRuntimeClasspath
+org.apache.lucene:lucene-analysis-phonetic:10.2.2=jarValidation,runtimeClasspath,testRuntimeClasspath
+org.apache.lucene:lucene-backward-codecs:10.2.2=jarValidation,runtimeClasspath,testRuntimeClasspath
+org.apache.lucene:lucene-classification:10.2.2=jarValidation,runtimeClasspath,testRuntimeClasspath
+org.apache.lucene:lucene-codecs:10.2.2=jarValidation,runtimeClasspath,testRuntimeClasspath
+org.apache.lucene:lucene-core:10.2.2=compileClasspath,jarValidation,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
+org.apache.lucene:lucene-expressions:10.2.2=jarValidation,runtimeClasspath,testRuntimeClasspath
+org.apache.lucene:lucene-facet:10.2.2=jarValidation,runtimeClasspath,testRuntimeClasspath
+org.apache.lucene:lucene-grouping:10.2.2=jarValidation,runtimeClasspath,testRuntimeClasspath
+org.apache.lucene:lucene-highlighter:10.2.2=jarValidation,runtimeClasspath,testRuntimeClasspath
+org.apache.lucene:lucene-join:10.2.2=jarValidation,runtimeClasspath,testRuntimeClasspath
+org.apache.lucene:lucene-memory:10.2.2=jarValidation,runtimeClasspath,testRuntimeClasspath
+org.apache.lucene:lucene-misc:10.2.2=jarValidation,runtimeClasspath,testRuntimeClasspath
+org.apache.lucene:lucene-queries:10.2.2=compileClasspath,jarValidation,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
+org.apache.lucene:lucene-queryparser:10.2.2=jarValidation,runtimeClasspath,testRuntimeClasspath
+org.apache.lucene:lucene-sandbox:10.2.2=jarValidation,runtimeClasspath,testRuntimeClasspath
+org.apache.lucene:lucene-spatial-extras:10.2.2=jarValidation,runtimeClasspath,testRuntimeClasspath
+org.apache.lucene:lucene-spatial3d:10.2.2=jarValidation,runtimeClasspath,testRuntimeClasspath
+org.apache.lucene:lucene-suggest:10.2.2=jarValidation,runtimeClasspath,testRuntimeClasspath
+org.apache.lucene:lucene-test-framework:10.2.2=compileClasspath,jarValidation,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.apache.zookeeper:zookeeper-jute:3.9.3=compileClasspath,jarValidation,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.apache.zookeeper:zookeeper:3.9.3=compileClasspath,jarValidation,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
org.apiguardian:apiguardian-api:1.1.2=jarValidation,runtimeClasspath,testRuntimeClasspath
diff --git a/solr/core/gradle.lockfile b/solr/core/gradle.lockfile
index 836594522e7..5fa9a373814 100644
--- a/solr/core/gradle.lockfile
+++ b/solr/core/gradle.lockfile
@@ -30,18 +30,18 @@ com.google.errorprone:error_prone_annotations:2.31.0=annotationProcessor,apiHelp
com.google.errorprone:error_prone_check_api:2.31.0=annotationProcessor,errorprone,testAnnotationProcessor
com.google.errorprone:error_prone_core:2.31.0=annotationProcessor,errorprone,testAnnotationProcessor
com.google.errorprone:error_prone_type_annotations:2.31.0=annotationProcessor,errorprone,testAnnotationProcessor
-com.google.errorprone:javac:9+181-r4173-1=errorproneJavac
com.google.guava:failureaccess:1.0.2=annotationProcessor,apiHelper,compileClasspath,errorprone,jarValidation,runtimeClasspath,runtimeLibs,testAnnotationProcessor,testCompileClasspath,testRuntimeClasspath
com.google.guava:guava:33.1.0-jre=annotationProcessor,apiHelper,compileClasspath,errorprone,jarValidation,runtimeClasspath,runtimeLibs,testAnnotationProcessor,testCompileClasspath,testRuntimeClasspath
com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava=annotationProcessor,apiHelper,compileClasspath,errorprone,jarValidation,runtimeClasspath,runtimeLibs,testAnnotationProcessor,testCompileClasspath,testRuntimeClasspath
com.google.j2objc:j2objc-annotations:3.0.0=compileClasspath,testCompileClasspath
com.google.protobuf:protobuf-java:3.25.3=annotationProcessor,errorprone,testAnnotationProcessor
-com.ibm.icu:icu4j:74.2=jarValidation,testRuntimeClasspath
+com.ibm.icu:icu4j:77.1=jarValidation,testRuntimeClasspath
com.j256.simplemagic:simplemagic:1.17=compileClasspath,jarValidation,runtimeClasspath,runtimeLibs,testCompileClasspath,testRuntimeClasspath
com.jayway.jsonpath:json-path:2.9.0=compileClasspath,jarValidation,runtimeClasspath,runtimeLibs,testCompileClasspath,testRuntimeClasspath
com.tdunning:t-digest:3.3=compileClasspath,jarValidation,runtimeClasspath,runtimeLibs,testCompileClasspath,testRuntimeClasspath
commons-cli:commons-cli:1.9.0=compileClasspath,jarValidation,runtimeClasspath,runtimeLibs,testCompileClasspath,testRuntimeClasspath
-commons-codec:commons-codec:1.17.1=apiHelper,compileClasspath,jarValidation,runtimeClasspath,runtimeLibs,testCompileClasspath,testRuntimeClasspath
+commons-codec:commons-codec:1.17.1=apiHelper,compileClasspath,testCompileClasspath
+commons-codec:commons-codec:1.17.2=jarValidation,runtimeClasspath,runtimeLibs,testRuntimeClasspath
commons-io:commons-io:2.17.0=apiHelper,compileClasspath,jarValidation,runtimeClasspath,runtimeLibs,testCompileClasspath,testRuntimeClasspath
io.dropwizard.metrics:metrics-annotation:4.2.26=jarValidation,testRuntimeClasspath
io.dropwizard.metrics:metrics-core:4.2.26=apiHelper,compileClasspath,jarValidation,runtimeClasspath,runtimeLibs,testCompileClasspath,testRuntimeClasspath
@@ -81,7 +81,7 @@ javax.inject:javax.inject:1=annotationProcessor,errorprone,testAnnotationProcess
javax.servlet:javax.servlet-api:3.1.0=permitUnusedDeclared
junit:junit:4.13.2=jarValidation,testCompileClasspath,testRuntimeClasspath
net.bytebuddy:byte-buddy:1.17.4=jarValidation,testCompileClasspath,testRuntimeClasspath
-org.antlr:antlr4-runtime:4.11.1=jarValidation,runtimeClasspath,runtimeLibs,testRuntimeClasspath
+org.antlr:antlr4-runtime:4.13.2=jarValidation,runtimeClasspath,runtimeLibs,testRuntimeClasspath
org.apache.commons:commons-exec:1.4.0=compileClasspath,jarValidation,runtimeClasspath,runtimeLibs,testCompileClasspath,testRuntimeClasspath
org.apache.commons:commons-lang3:3.15.0=compileClasspath,jarValidation,runtimeClasspath,runtimeLibs,testCompileClasspath,testRuntimeClasspath
org.apache.commons:commons-math3:3.6.1=apiHelper,compileClasspath,jarValidation,runtimeClasspath,runtimeLibs,testCompileClasspath,testRuntimeClasspath
@@ -94,34 +94,34 @@ org.apache.httpcomponents:httpmime:4.5.14=apiHelper,compileClasspath,jarValidati
org.apache.logging.log4j:log4j-api:2.21.0=compileClasspath,jarValidation,runtimeClasspath,runtimeLibs,testCompileClasspath,testRuntimeClasspath
org.apache.logging.log4j:log4j-core:2.21.0=compileClasspath,jarValidation,runtimeClasspath,runtimeLibs,testCompileClasspath,testRuntimeClasspath
org.apache.logging.log4j:log4j-slf4j2-impl:2.21.0=jarValidation,runtimeClasspath,runtimeLibs,testRuntimeClasspath
-org.apache.lucene:lucene-analysis-common:9.12.2=apiHelper,compileClasspath,jarValidation,runtimeClasspath,runtimeLibs,testCompileClasspath,testRuntimeClasspath
-org.apache.lucene:lucene-analysis-icu:9.12.2=jarValidation,testRuntimeClasspath
-org.apache.lucene:lucene-analysis-kuromoji:9.12.2=jarValidation,runtimeClasspath,runtimeLibs,testRuntimeClasspath
-org.apache.lucene:lucene-analysis-morfologik:9.12.2=jarValidation,testRuntimeClasspath
-org.apache.lucene:lucene-analysis-nori:9.12.2=jarValidation,runtimeClasspath,runtimeLibs,testRuntimeClasspath
-org.apache.lucene:lucene-analysis-opennlp:9.12.2=jarValidation,testRuntimeClasspath
-org.apache.lucene:lucene-analysis-phonetic:9.12.2=jarValidation,runtimeClasspath,runtimeLibs,testRuntimeClasspath
-org.apache.lucene:lucene-analysis-smartcn:9.12.2=jarValidation,testRuntimeClasspath
-org.apache.lucene:lucene-analysis-stempel:9.12.2=jarValidation,testRuntimeClasspath
-org.apache.lucene:lucene-backward-codecs:9.12.2=compileClasspath,jarValidation,permitUnusedDeclared,runtimeClasspath,runtimeLibs,testCompileClasspath,testRuntimeClasspath
-org.apache.lucene:lucene-classification:9.12.2=compileClasspath,jarValidation,runtimeClasspath,runtimeLibs,testCompileClasspath,testRuntimeClasspath
-org.apache.lucene:lucene-codecs:9.12.2=compileClasspath,jarValidation,runtimeClasspath,runtimeLibs,testCompileClasspath,testRuntimeClasspath
-org.apache.lucene:lucene-core:9.12.2=apiHelper,compileClasspath,jarValidation,permitUnusedDeclared,runtimeClasspath,runtimeLibs,testCompileClasspath,testRuntimeClasspath
-org.apache.lucene:lucene-expressions:9.12.2=compileClasspath,jarValidation,runtimeClasspath,runtimeLibs,testCompileClasspath,testRuntimeClasspath
-org.apache.lucene:lucene-facet:9.12.2=compileClasspath,jarValidation,runtimeClasspath,runtimeLibs,testCompileClasspath,testRuntimeClasspath
-org.apache.lucene:lucene-grouping:9.12.2=compileClasspath,jarValidation,runtimeClasspath,runtimeLibs,testCompileClasspath,testRuntimeClasspath
-org.apache.lucene:lucene-highlighter:9.12.2=compileClasspath,jarValidation,runtimeClasspath,runtimeLibs,testCompileClasspath,testRuntimeClasspath
-org.apache.lucene:lucene-join:9.12.2=compileClasspath,jarValidation,runtimeClasspath,runtimeLibs,testCompileClasspath,testRuntimeClasspath
-org.apache.lucene:lucene-memory:9.12.2=jarValidation,runtimeClasspath,runtimeLibs,testRuntimeClasspath
-org.apache.lucene:lucene-misc:9.12.2=compileClasspath,jarValidation,runtimeClasspath,runtimeLibs,testCompileClasspath,testRuntimeClasspath
-org.apache.lucene:lucene-queries:9.12.2=apiHelper,compileClasspath,jarValidation,runtimeClasspath,runtimeLibs,testCompileClasspath,testRuntimeClasspath
-org.apache.lucene:lucene-queryparser:9.12.2=compileClasspath,jarValidation,runtimeClasspath,runtimeLibs,testCompileClasspath,testRuntimeClasspath
-org.apache.lucene:lucene-sandbox:9.12.2=compileClasspath,jarValidation,runtimeClasspath,runtimeLibs,testCompileClasspath,testRuntimeClasspath
-org.apache.lucene:lucene-spatial-extras:9.12.2=compileClasspath,jarValidation,runtimeClasspath,runtimeLibs,testCompileClasspath,testRuntimeClasspath
-org.apache.lucene:lucene-spatial3d:9.12.2=compileClasspath,jarValidation,runtimeClasspath,runtimeLibs,testCompileClasspath,testRuntimeClasspath
-org.apache.lucene:lucene-suggest:9.12.2=compileClasspath,jarValidation,runtimeClasspath,runtimeLibs,testCompileClasspath,testRuntimeClasspath
-org.apache.lucene:lucene-test-framework:9.12.2=jarValidation,testCompileClasspath,testRuntimeClasspath
-org.apache.opennlp:opennlp-tools:1.9.4=jarValidation,testRuntimeClasspath
+org.apache.lucene:lucene-analysis-common:10.2.2=apiHelper,compileClasspath,jarValidation,runtimeClasspath,runtimeLibs,testCompileClasspath,testRuntimeClasspath
+org.apache.lucene:lucene-analysis-icu:10.2.2=jarValidation,testRuntimeClasspath
+org.apache.lucene:lucene-analysis-kuromoji:10.2.2=jarValidation,runtimeClasspath,runtimeLibs,testRuntimeClasspath
+org.apache.lucene:lucene-analysis-morfologik:10.2.2=jarValidation,testRuntimeClasspath
+org.apache.lucene:lucene-analysis-nori:10.2.2=jarValidation,runtimeClasspath,runtimeLibs,testRuntimeClasspath
+org.apache.lucene:lucene-analysis-opennlp:10.2.2=jarValidation,testRuntimeClasspath
+org.apache.lucene:lucene-analysis-phonetic:10.2.2=jarValidation,runtimeClasspath,runtimeLibs,testRuntimeClasspath
+org.apache.lucene:lucene-analysis-smartcn:10.2.2=jarValidation,testRuntimeClasspath
+org.apache.lucene:lucene-analysis-stempel:10.2.2=jarValidation,testRuntimeClasspath
+org.apache.lucene:lucene-backward-codecs:10.2.2=compileClasspath,jarValidation,permitUnusedDeclared,runtimeClasspath,runtimeLibs,testCompileClasspath,testRuntimeClasspath
+org.apache.lucene:lucene-classification:10.2.2=compileClasspath,jarValidation,runtimeClasspath,runtimeLibs,testCompileClasspath,testRuntimeClasspath
+org.apache.lucene:lucene-codecs:10.2.2=compileClasspath,jarValidation,runtimeClasspath,runtimeLibs,testCompileClasspath,testRuntimeClasspath
+org.apache.lucene:lucene-core:10.2.2=apiHelper,compileClasspath,jarValidation,permitUnusedDeclared,runtimeClasspath,runtimeLibs,testCompileClasspath,testRuntimeClasspath
+org.apache.lucene:lucene-expressions:10.2.2=compileClasspath,jarValidation,runtimeClasspath,runtimeLibs,testCompileClasspath,testRuntimeClasspath
+org.apache.lucene:lucene-facet:10.2.2=compileClasspath,jarValidation,runtimeClasspath,runtimeLibs,testCompileClasspath,testRuntimeClasspath
+org.apache.lucene:lucene-grouping:10.2.2=compileClasspath,jarValidation,runtimeClasspath,runtimeLibs,testCompileClasspath,testRuntimeClasspath
+org.apache.lucene:lucene-highlighter:10.2.2=compileClasspath,jarValidation,runtimeClasspath,runtimeLibs,testCompileClasspath,testRuntimeClasspath
+org.apache.lucene:lucene-join:10.2.2=compileClasspath,jarValidation,runtimeClasspath,runtimeLibs,testCompileClasspath,testRuntimeClasspath
+org.apache.lucene:lucene-memory:10.2.2=jarValidation,runtimeClasspath,runtimeLibs,testRuntimeClasspath
+org.apache.lucene:lucene-misc:10.2.2=compileClasspath,jarValidation,runtimeClasspath,runtimeLibs,testCompileClasspath,testRuntimeClasspath
+org.apache.lucene:lucene-queries:10.2.2=apiHelper,compileClasspath,jarValidation,runtimeClasspath,runtimeLibs,testCompileClasspath,testRuntimeClasspath
+org.apache.lucene:lucene-queryparser:10.2.2=compileClasspath,jarValidation,runtimeClasspath,runtimeLibs,testCompileClasspath,testRuntimeClasspath
+org.apache.lucene:lucene-sandbox:10.2.2=compileClasspath,jarValidation,runtimeClasspath,runtimeLibs,testCompileClasspath,testRuntimeClasspath
+org.apache.lucene:lucene-spatial-extras:10.2.2=compileClasspath,jarValidation,runtimeClasspath,runtimeLibs,testCompileClasspath,testRuntimeClasspath
+org.apache.lucene:lucene-spatial3d:10.2.2=compileClasspath,jarValidation,runtimeClasspath,runtimeLibs,testCompileClasspath,testRuntimeClasspath
+org.apache.lucene:lucene-suggest:10.2.2=compileClasspath,jarValidation,runtimeClasspath,runtimeLibs,testCompileClasspath,testRuntimeClasspath
+org.apache.lucene:lucene-test-framework:10.2.2=jarValidation,testCompileClasspath,testRuntimeClasspath
+org.apache.opennlp:opennlp-tools:2.5.3=jarValidation,testRuntimeClasspath
org.apache.zookeeper:zookeeper-jute:3.9.3=apiHelper,compileClasspath,jarValidation,runtimeClasspath,runtimeLibs,testCompileClasspath,testRuntimeClasspath
org.apache.zookeeper:zookeeper:3.9.3=apiHelper,compileClasspath,jarValidation,runtimeClasspath,runtimeLibs,testCompileClasspath,testRuntimeClasspath
org.apiguardian:apiguardian-api:1.1.2=jarValidation,testCompileClasspath,testRuntimeClasspath
diff --git a/solr/core/src/java/org/apache/solr/blockcache/BlockDirectory.java b/solr/core/src/java/org/apache/solr/blockcache/BlockDirectory.java
index 63d1db252b9..18f87785afe 100644
--- a/solr/core/src/java/org/apache/solr/blockcache/BlockDirectory.java
+++ b/solr/core/src/java/org/apache/solr/blockcache/BlockDirectory.java
@@ -21,6 +21,7 @@ import java.io.IOException;
import java.lang.invoke.MethodHandles;
import java.nio.file.Files;
import java.nio.file.Path;
+import java.util.Objects;
import java.util.Set;
import org.apache.lucene.index.IndexFileNames;
import org.apache.lucene.store.Directory;
@@ -322,25 +323,11 @@ public class BlockDirectory extends FilterDirectory implements ShutdownAwareDire
if (blockCacheFileTypes != null && !isCachableFile(name)) {
return false;
}
- switch (context.context) {
- // depending on params, we don't cache on merges or when only reading once
- case MERGE:
- {
- return cacheMerges;
- }
- case READ:
- {
- if (context.readOnce) {
- return cacheReadOnce;
- } else {
- return true;
- }
- }
- default:
- {
- return true;
- }
- }
+ return switch (context.context()) {
+ // depending on params, we don't cache on merges or when only reading once
+ case MERGE -> cacheMerges;
+ default -> true;
+ };
}
/** Determine whether write caching should be used for a particular file/context. */
@@ -353,17 +340,8 @@ public class BlockDirectory extends FilterDirectory implements ShutdownAwareDire
if (blockCacheFileTypes != null && !isCachableFile(name)) {
return false;
}
- switch (context.context) {
- case MERGE:
- {
- // we currently don't cache any merge context writes
- return false;
- }
- default:
- {
- return true;
- }
- }
+ // we currently don't cache any merge context writes
+ return Objects.requireNonNull(context.context()) != IOContext.Context.MERGE;
}
@Override
diff --git a/solr/core/src/java/org/apache/solr/core/CoreContainer.java b/solr/core/src/java/org/apache/solr/core/CoreContainer.java
index db5c97cc921..87cbc6b9506 100644
--- a/solr/core/src/java/org/apache/solr/core/CoreContainer.java
+++ b/solr/core/src/java/org/apache/solr/core/CoreContainer.java
@@ -60,7 +60,6 @@ import org.apache.http.auth.AuthSchemeProvider;
import org.apache.http.client.CredentialsProvider;
import org.apache.http.config.Lookup;
import org.apache.lucene.index.CorruptIndexException;
-import org.apache.lucene.search.IndexSearcher;
import org.apache.lucene.store.Directory;
import org.apache.lucene.util.BytesRef;
import org.apache.solr.api.ClusterPluginsSource;
@@ -422,9 +421,6 @@ public class CoreContainer {
this.solrCores = SolrCores.newSolrCores(this);
this.nodeKeyPair = new SolrNodeKeyPair(cfg.getCloudConfig());
containerHandlers.put(PublicKeyHandler.PATH, new PublicKeyHandler(nodeKeyPair));
- if (null != this.cfg.getBooleanQueryMaxClauseCount()) {
- IndexSearcher.setMaxClauseCount(this.cfg.getBooleanQueryMaxClauseCount());
- }
setWeakStringInterner();
this.coresLocator = locator;
this.containerProperties = new Properties(config.getSolrProperties());
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 b96cd1f14a8..3194c6a9afa 100644
--- a/solr/core/src/java/org/apache/solr/core/MMapDirectoryFactory.java
+++ b/solr/core/src/java/org/apache/solr/core/MMapDirectoryFactory.java
@@ -34,8 +34,10 @@ import org.slf4j.LoggerFactory;
* <p>Can set the following parameters:
*
* <ul>
- * <li>unmap -- See {@link MMapDirectory#setUseUnmap(boolean)}
- * <li>preload -- See {@link MMapDirectory#setPreload(boolean)}
+ * <li>unmap -- Unmapping is now controlled via system property
+ * org.apache.lucene.store.MMapDirectory.enableUnmapHack
+ * <li>preload -- Controls whether to preload files into physical memory. See {@link
+ * MMapDirectory#setPreload(java.util.function.BiPredicate)}
* <li>maxChunkSize -- The Max chunk size. See {@link MMapDirectory#MMapDirectory(Path,
* LockFactory, long)}
* </ul>
@@ -65,7 +67,7 @@ public class MMapDirectoryFactory extends StandardDirectoryFactory {
@Override
protected Directory create(String path, LockFactory lockFactory) throws IOException {
MMapDirectory mapDirectory = new MMapDirectory(Path.of(path), lockFactory, maxChunk);
- mapDirectory.setPreload(preload);
+ mapDirectory.setPreload((s, ioContext) -> preload);
return mapDirectory;
}
}
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 cf1c0f18d0a..a40b9a51161 100644
--- a/solr/core/src/java/org/apache/solr/core/SchemaCodecFactory.java
+++ b/solr/core/src/java/org/apache/solr/core/SchemaCodecFactory.java
@@ -26,8 +26,8 @@ import org.apache.lucene.codecs.KnnVectorsFormat;
import org.apache.lucene.codecs.KnnVectorsReader;
import org.apache.lucene.codecs.KnnVectorsWriter;
import org.apache.lucene.codecs.PostingsFormat;
-import org.apache.lucene.codecs.lucene912.Lucene912Codec;
-import org.apache.lucene.codecs.lucene912.Lucene912Codec.Mode;
+import org.apache.lucene.codecs.lucene101.Lucene101Codec;
+import org.apache.lucene.codecs.lucene101.Lucene101Codec.Mode;
import org.apache.lucene.codecs.lucene99.Lucene99HnswVectorsFormat;
import org.apache.lucene.index.SegmentReadState;
import org.apache.lucene.index.SegmentWriteState;
@@ -97,7 +97,7 @@ public class SchemaCodecFactory extends CodecFactory implements SolrCoreAware {
log.debug("Using default compressionMode: {}", compressionMode);
}
codec =
- new Lucene912Codec(compressionMode) {
+ new Lucene101Codec(compressionMode) {
@Override
public PostingsFormat getPostingsFormatForField(String field) {
final SchemaField schemaField = core.getLatestSchema().getFieldOrNull(field);
diff --git a/solr/core/src/java/org/apache/solr/core/SolrConfig.java b/solr/core/src/java/org/apache/solr/core/SolrConfig.java
index 4d7962a5ea5..757503c4788 100644
--- a/solr/core/src/java/org/apache/solr/core/SolrConfig.java
+++ b/solr/core/src/java/org/apache/solr/core/SolrConfig.java
@@ -53,7 +53,6 @@ import java.util.regex.Matcher;
import java.util.regex.Pattern;
import org.apache.commons.io.FileUtils;
import org.apache.lucene.index.IndexDeletionPolicy;
-import org.apache.lucene.search.BooleanQuery;
import org.apache.lucene.search.IndexSearcher;
import org.apache.lucene.util.Version;
import org.apache.solr.client.solrj.io.stream.expr.Expressible;
@@ -267,12 +266,12 @@ public class SolrConfig implements MapSerializable {
indexConfig = new SolrIndexConfig(get("indexConfig"), null);
booleanQueryMaxClauseCount =
- get("query").get("maxBooleanClauses").intVal(BooleanQuery.getMaxClauseCount());
+ get("query").get("maxBooleanClauses").intVal(IndexSearcher.getMaxClauseCount());
if (IndexSearcher.getMaxClauseCount() < booleanQueryMaxClauseCount) {
log.warn(
"solrconfig.xml: <maxBooleanClauses> of {} is greater than global limit of {} and will have no effect {}",
booleanQueryMaxClauseCount,
- BooleanQuery.getMaxClauseCount(),
+ IndexSearcher.getMaxClauseCount(),
"set 'maxBooleanClauses' in solr.xml to increase global limit");
}
prefixQueryMinPrefixLength =
diff --git a/solr/core/src/java/org/apache/solr/core/SolrCore.java b/solr/core/src/java/org/apache/solr/core/SolrCore.java
index b8ad0c5c18f..9c01d29b8e5 100644
--- a/solr/core/src/java/org/apache/solr/core/SolrCore.java
+++ b/solr/core/src/java/org/apache/solr/core/SolrCore.java
@@ -2368,6 +2368,7 @@ public class SolrCore implements SolrInfoBean, Closeable {
// (caches take a little while to instantiate)
final boolean useCaches = !realtime;
final String newName = realtime ? "realtime" : "main";
+ int maxBooleanClauses = getSolrConfig().booleanQueryMaxClauseCount;
tmp =
new SolrIndexSearcher(
this,
@@ -2378,7 +2379,8 @@ public class SolrCore implements SolrInfoBean, Closeable {
true,
useCaches,
true,
- directoryFactory);
+ directoryFactory,
+ maxBooleanClauses);
} else {
// newestSearcher == null at this point
@@ -2388,6 +2390,7 @@ public class SolrCore implements SolrInfoBean, Closeable {
// so that we pick up any uncommitted changes and so we don't go backwards
// in time on a core reload
DirectoryReader newReader = newReaderCreator.call();
+ int maxBooleanClauses = getSolrConfig().booleanQueryMaxClauseCount;
tmp =
new SolrIndexSearcher(
this,
@@ -2398,7 +2401,8 @@ public class SolrCore implements SolrInfoBean, Closeable {
true,
!realtime,
true,
- directoryFactory);
+ directoryFactory,
+ maxBooleanClauses);
} else {
RefCounted<IndexWriter> writer = getSolrCoreState().getIndexWriter(this);
DirectoryReader newReader = null;
@@ -2407,6 +2411,7 @@ public class SolrCore implements SolrInfoBean, Closeable {
} finally {
writer.decref();
}
+ int maxBooleanClauses = getSolrConfig().booleanQueryMaxClauseCount;
tmp =
new SolrIndexSearcher(
this,
@@ -2417,7 +2422,8 @@ public class SolrCore implements SolrInfoBean, Closeable {
true,
!realtime,
true,
- directoryFactory);
+ directoryFactory,
+ maxBooleanClauses);
}
}
diff --git a/solr/core/src/java/org/apache/solr/core/backup/repository/BackupRepository.java b/solr/core/src/java/org/apache/solr/core/backup/repository/BackupRepository.java
index 5e45e5ef206..b8f86af5e3e 100644
--- a/solr/core/src/java/org/apache/solr/core/backup/repository/BackupRepository.java
+++ b/solr/core/src/java/org/apache/solr/core/backup/repository/BackupRepository.java
@@ -216,7 +216,7 @@ public interface BackupRepository extends NamedListInitializedPlugin, Closeable
Directory sourceDir, String sourceFileName, Directory destDir, String destFileName)
throws IOException {
boolean success = false;
- try (ChecksumIndexInput is = sourceDir.openChecksumInput(sourceFileName, IOContext.READONCE);
+ try (ChecksumIndexInput is = sourceDir.openChecksumInput(sourceFileName);
IndexOutput os = destDir.createOutput(destFileName, IOContext.READONCE)) {
os.copyBytes(is, is.length() - CodecUtil.footerLength());
@@ -247,7 +247,7 @@ public interface BackupRepository extends NamedListInitializedPlugin, Closeable
* @since 8.3.0
*/
default Checksum checksum(Directory dir, String fileName) throws IOException {
- try (IndexInput in = dir.openChecksumInput(fileName, IOContext.READONCE)) {
+ try (IndexInput in = dir.openChecksumInput(fileName)) {
return new Checksum(CodecUtil.retrieveChecksum(in), in.length());
}
}
diff --git a/solr/core/src/java/org/apache/solr/handler/AnalyzeEvaluator.java b/solr/core/src/java/org/apache/solr/handler/AnalyzeEvaluator.java
index efd8471ce3d..b027381f115 100644
--- a/solr/core/src/java/org/apache/solr/handler/AnalyzeEvaluator.java
+++ b/solr/core/src/java/org/apache/solr/handler/AnalyzeEvaluator.java
@@ -89,7 +89,7 @@ public class AnalyzeEvaluator extends SourceEvaluator {
List<String> tokens = new ArrayList<>();
try (TokenStream tokenStream = analyzer.tokenStream(analyzerField, value)) {
- CharTermAttribute termAtt = tokenStream.getAttribute(CharTermAttribute.class);
+ CharTermAttribute termAtt = tokenStream.addAttribute(CharTermAttribute.class);
tokenStream.reset();
while (tokenStream.incrementToken()) {
tokens.add(termAtt.toString());
diff --git a/solr/core/src/java/org/apache/solr/handler/BlobHandler.java b/solr/core/src/java/org/apache/solr/handler/BlobHandler.java
index 1befa4f6e77..fff7a63d55d 100644
--- a/solr/core/src/java/org/apache/solr/handler/BlobHandler.java
+++ b/solr/core/src/java/org/apache/solr/handler/BlobHandler.java
@@ -140,7 +140,7 @@ public class BlobHandler extends RequestHandlerBase
new Sort(new SortField("version", SortField.Type.LONG, true)));
long version = 0;
- if (docs.totalHits.value > 0) {
+ if (docs.totalHits.value() > 0) {
Document doc = req.getSearcher().getDocFetcher().doc(docs.scoreDocs[0].doc);
Number n = doc.getField("version").numericValue();
version = n.longValue();
@@ -208,7 +208,7 @@ public class BlobHandler extends RequestHandlerBase
qparser.parse(),
1,
new Sort(new SortField("version", SortField.Type.LONG, true)));
- if (docs.totalHits.value > 0) {
+ if (docs.totalHits.value() > 0) {
rsp.add(
ReplicationAPIBase.FILE_STREAM,
new SolrCore.RawWriter() {
diff --git a/solr/core/src/java/org/apache/solr/handler/ClassifyStream.java b/solr/core/src/java/org/apache/solr/handler/ClassifyStream.java
index 25d6c240a06..02b0c347ffd 100644
--- a/solr/core/src/java/org/apache/solr/handler/ClassifyStream.java
+++ b/solr/core/src/java/org/apache/solr/handler/ClassifyStream.java
@@ -156,7 +156,7 @@ public class ClassifyStream extends TupleStream implements Expressible {
double[] tfs = new double[termToIndex.size()];
TokenStream tokenStream = analyzer.tokenStream(analyzerField, text);
- CharTermAttribute termAtt = tokenStream.getAttribute(CharTermAttribute.class);
+ CharTermAttribute termAtt = tokenStream.addAttribute(CharTermAttribute.class);
tokenStream.reset();
int termCount = 0;
diff --git a/solr/core/src/java/org/apache/solr/handler/DocumentAnalysisRequestHandler.java b/solr/core/src/java/org/apache/solr/handler/DocumentAnalysisRequestHandler.java
index 85073e37fc7..ae4ba8d9644 100644
--- a/solr/core/src/java/org/apache/solr/handler/DocumentAnalysisRequestHandler.java
+++ b/solr/core/src/java/org/apache/solr/handler/DocumentAnalysisRequestHandler.java
@@ -279,7 +279,7 @@ public class DocumentAnalysisRequestHandler extends AnalysisRequestHandlerBase {
while (true) {
int event = reader.next();
switch (event) {
- // Add everything to the text
+ // Add everything to the text
case XMLStreamConstants.SPACE:
case XMLStreamConstants.CDATA:
case XMLStreamConstants.CHARACTERS:
diff --git a/solr/core/src/java/org/apache/solr/handler/MoreLikeThisHandler.java b/solr/core/src/java/org/apache/solr/handler/MoreLikeThisHandler.java
index e3a5d451cf9..10931705906 100644
--- a/solr/core/src/java/org/apache/solr/handler/MoreLikeThisHandler.java
+++ b/solr/core/src/java/org/apache/solr/handler/MoreLikeThisHandler.java
@@ -380,7 +380,7 @@ public class MoreLikeThisHandler extends RequestHandlerBase {
BooleanQuery.Builder newQ = new BooleanQuery.Builder();
newQ.setMinimumNumberShouldMatch(boostedQuery.getMinimumNumberShouldMatch());
for (BooleanClause clause : boostedQuery) {
- Query q = clause.getQuery();
+ Query q = clause.query();
float originalBoost = 1f;
if (q instanceof BoostQuery bq) {
q = bq.getQuery();
@@ -390,8 +390,8 @@ public class MoreLikeThisHandler extends RequestHandlerBase {
q =
((fieldBoost != null)
? new BoostQuery(q, fieldBoost * originalBoost)
- : clause.getQuery());
- newQ.add(q, clause.getOccur());
+ : clause.query());
+ newQ.add(q, clause.occur());
}
boostedQuery = newQ.build();
}
@@ -478,7 +478,7 @@ public class MoreLikeThisHandler extends RequestHandlerBase {
if (maxTerms > -1 && output.size() >= maxTerms) {
break;
}
- Query q = o.getQuery();
+ Query q = o.query();
float boost = 1f;
if (q instanceof BoostQuery bq) {
q = bq.getQuery();
diff --git a/solr/core/src/java/org/apache/solr/handler/admin/api/GetSegmentData.java b/solr/core/src/java/org/apache/solr/handler/admin/api/GetSegmentData.java
index ceec55ea33f..fb11371c6e8 100644
--- a/solr/core/src/java/org/apache/solr/handler/admin/api/GetSegmentData.java
+++ b/solr/core/src/java/org/apache/solr/handler/admin/api/GetSegmentData.java
@@ -317,10 +317,10 @@ public class GetSegmentData extends JerseyResource implements SegmentsApi {
if (seg != null) {
LeafMetaData metaData = seg.getMetaData();
if (metaData != null) {
- segmentInfo.createdVersionMajor = metaData.getCreatedVersionMajor();
- segmentInfo.minVersion = metaData.getMinVersion().toString();
- if (metaData.getSort() != null) {
- segmentInfo.sort = metaData.getSort().toString();
+ segmentInfo.createdVersionMajor = metaData.createdVersionMajor();
+ segmentInfo.minVersion = metaData.minVersion().toString();
+ if (metaData.sort() != null) {
+ segmentInfo.sort = metaData.sort().toString();
}
}
}
@@ -417,7 +417,7 @@ public class GetSegmentData extends JerseyResource implements SegmentsApi {
} else {
flags.append("----");
}
- flags.append((fi.hasVectors()) ? FieldFlag.TERM_VECTOR_STORED.getAbbreviation() : '-');
+ flags.append((fi.hasTermVectors()) ? FieldFlag.TERM_VECTOR_STORED.getAbbreviation() : '-');
flags.append((fi.omitsNorms()) ? FieldFlag.OMIT_NORMS.getAbbreviation() : '-');
flags.append((DOCS == opts) ? FieldFlag.OMIT_TF.getAbbreviation() : '-');
@@ -477,9 +477,9 @@ public class GetSegmentData extends JerseyResource implements SegmentsApi {
if (!hasPoints && (sf.omitNorms() != fi.omitsNorms())) {
nonCompliant.put("omitNorms", "schema=" + sf.omitNorms() + ", segment=" + fi.omitsNorms());
}
- if (sf.storeTermVector() != fi.hasVectors()) {
+ if (sf.storeTermVector() != fi.hasTermVectors()) {
nonCompliant.put(
- "termVectors", "schema=" + sf.storeTermVector() + ", segment=" + fi.hasVectors());
+ "termVectors", "schema=" + sf.storeTermVector() + ", segment=" + fi.hasTermVectors());
}
if (sf.storeOffsetsWithPositions()
!= (fi.getIndexOptions() == IndexOptions.DOCS_AND_FREQS_AND_POSITIONS_AND_OFFSETS)) {
diff --git a/solr/core/src/java/org/apache/solr/handler/component/ExpandComponent.java b/solr/core/src/java/org/apache/solr/handler/component/ExpandComponent.java
index d366801e22c..5ea1a42461b 100644
--- a/solr/core/src/java/org/apache/solr/handler/component/ExpandComponent.java
+++ b/solr/core/src/java/org/apache/solr/handler/component/ExpandComponent.java
@@ -53,7 +53,8 @@ import org.apache.lucene.search.TermInSetQuery;
import org.apache.lucene.search.TopDocs;
import org.apache.lucene.search.TopDocsCollector;
import org.apache.lucene.search.TopFieldCollector;
-import org.apache.lucene.search.TopScoreDocCollector;
+import org.apache.lucene.search.TopFieldCollectorManager;
+import org.apache.lucene.search.TopScoreDocCollectorManager;
import org.apache.lucene.search.TotalHitCountCollector;
import org.apache.lucene.search.TotalHits;
import org.apache.lucene.util.BitSetIterator;
@@ -776,13 +777,13 @@ public class ExpandComponent extends SearchComponent implements PluginInfoInitia
docs[i] = scoreDoc.doc;
scores[i] = scoreDoc.score;
}
- assert topDocs.totalHits.relation == TotalHits.Relation.EQUAL_TO;
+ assert topDocs.totalHits.relation() == TotalHits.Relation.EQUAL_TO;
return new DocSlice(
0,
docs.length,
docs,
scores,
- topDocs.totalHits.value,
+ topDocs.totalHits.value(),
Float.NaN,
TotalHits.Relation.EQUAL_TO);
}
@@ -823,9 +824,13 @@ public class ExpandComponent extends SearchComponent implements PluginInfoInitia
if (limit == 0) {
collector = new TotalHitCountCollector();
} else if (sort == null) {
- collector = TopScoreDocCollector.create(limit, Integer.MAX_VALUE);
+ TopScoreDocCollectorManager manager =
+ new TopScoreDocCollectorManager(limit, Integer.MAX_VALUE);
+ collector = manager.newCollector();
} else {
- collector = TopFieldCollector.create(sort, limit, Integer.MAX_VALUE);
+ TopFieldCollectorManager fieldManager =
+ new TopFieldCollectorManager(sort, limit, Integer.MAX_VALUE);
+ collector = fieldManager.newCollector();
}
return collector;
}
@@ -845,7 +850,7 @@ public class ExpandComponent extends SearchComponent implements PluginInfoInitia
bytesRefs[++index] = term.toBytesRef();
}
- return new TermInSetQuery(fname, bytesRefs);
+ return new TermInSetQuery(fname, Arrays.asList(bytesRefs));
}
private Query getPointGroupQuery(SchemaField sf, int size, LongHashSet groupSet) {
@@ -887,7 +892,7 @@ public class ExpandComponent extends SearchComponent implements PluginInfoInitia
IntObjectCursor<BytesRef> cursor = it.next();
bytesRefs[++index] = cursor.value;
}
- return new TermInSetQuery(fname, bytesRefs);
+ return new TermInSetQuery(fname, Arrays.asList(bytesRefs));
}
////////////////////////////////////////////
diff --git a/solr/core/src/java/org/apache/solr/handler/component/FacetComponent.java b/solr/core/src/java/org/apache/solr/handler/component/FacetComponent.java
index f216e0d6687..e30152afd6c 100644
--- a/solr/core/src/java/org/apache/solr/handler/component/FacetComponent.java
+++ b/solr/core/src/java/org/apache/solr/handler/component/FacetComponent.java
@@ -917,6 +917,7 @@ public class FacetComponent extends SearchComponent {
// The implementation below uses the first encountered shard's
// facet_intervals as the basis for subsequent shards' data to be merged.
private void doDistribIntervals(FacetInfo fi, NamedList<?> facet_counts) {
+
@SuppressWarnings("unchecked")
SimpleOrderedMap<SimpleOrderedMap<Integer>> facet_intervals =
(SimpleOrderedMap<SimpleOrderedMap<Integer>>) facet_counts.get(FACET_INTERVALS_KEY);
@@ -925,12 +926,19 @@ public class FacetComponent extends SearchComponent {
for (Map.Entry<String, SimpleOrderedMap<Integer>> entry : facet_intervals) {
final String field = entry.getKey();
+
SimpleOrderedMap<Integer> existingCounts = fi.intervalFacets.get(field);
+
if (existingCounts == null) {
+
// first time we've seen this field, no merging
fi.intervalFacets.add(field, entry.getValue());
+ // Debug the added counts
+ for (Map.Entry<String, Integer> intervalEntry : entry.getValue()) {}
+
} else {
+
// not the first time, merge current field counts
Iterator<Map.Entry<String, Integer>> newItr = entry.getValue().iterator();
Iterator<Map.Entry<String, Integer>> exItr = existingCounts.iterator();
@@ -950,7 +958,12 @@ public class FacetComponent extends SearchComponent {
ErrorCode.SERVER_ERROR,
"Interval facet shard response has extra key: " + newItem.getKey());
}
- exItem.setValue(exItem.getValue() + newItem.getValue());
+
+ int oldValue = exItem.getValue();
+ int newValue = newItem.getValue();
+ int mergedValue = oldValue + newValue;
+
+ exItem.setValue(mergedValue);
}
if (newItr.hasNext()) {
throw new SolrException(
diff --git a/solr/core/src/java/org/apache/solr/handler/component/PivotFacetValue.java b/solr/core/src/java/org/apache/solr/handler/component/PivotFacetValue.java
index b13b604d12b..c21c898fd37 100644
--- a/solr/core/src/java/org/apache/solr/handler/component/PivotFacetValue.java
+++ b/solr/core/src/java/org/apache/solr/handler/component/PivotFacetValue.java
@@ -145,8 +145,9 @@ public class PivotFacetValue {
case STATS -> statsValues = (NamedList<NamedList<NamedList<?>>>) value;
case QUERIES -> queryCounts = (NamedList<Number>) value;
case RANGES -> ranges = (SimpleOrderedMap<SimpleOrderedMap<Object>>) value;
- default -> throw new RuntimeException(
- "PivotListEntry contains unaccounted for item: " + pivotEntry);
+ default ->
+ throw new RuntimeException(
+ "PivotListEntry contains unaccounted for item: " + pivotEntry);
}
}
diff --git a/solr/core/src/java/org/apache/solr/handler/component/QueryComponent.java b/solr/core/src/java/org/apache/solr/handler/component/QueryComponent.java
index 6a6289ab919..a6dd3a06de2 100644
--- a/solr/core/src/java/org/apache/solr/handler/component/QueryComponent.java
+++ b/solr/core/src/java/org/apache/solr/handler/component/QueryComponent.java
@@ -90,6 +90,7 @@ import org.apache.solr.search.Grouping;
import org.apache.solr.search.QParser;
import org.apache.solr.search.QParserPlugin;
import org.apache.solr.search.QueryCommand;
+import org.apache.solr.search.QueryLimits;
import org.apache.solr.search.QueryParsing;
import org.apache.solr.search.QueryResult;
import org.apache.solr.search.QueryUtils;
@@ -375,11 +376,11 @@ public class QueryComponent extends SearchComponent {
return;
}
- final boolean multiThreaded = params.getBool(CommonParams.MULTI_THREADED, false);
-
// -1 as flag if not set.
long timeAllowed = params.getLong(CommonParams.TIME_ALLOWED, -1L);
+ final boolean multiThreaded = params.getBool(CommonParams.MULTI_THREADED, false);
+
QueryCommand cmd = rb.createQueryCommand();
cmd.setMultiThreaded(multiThreaded);
cmd.setTimeAllowed(timeAllowed);
@@ -566,10 +567,12 @@ public class QueryComponent extends SearchComponent {
}
rsp.add("sort_values", sortVals);
} catch (ExitableDirectoryReader.ExitingReaderException x) {
+ // Query timed out during field sort values
+ log.warn("Query timed out during field sort values", x);
// it's hard to understand where we stopped, so yield nothing
- // search handler will flag partial results
+ // Mark this as partial results so merging logic can handle it properly
+ rsp.setPartialResults(req);
rsp.add("sort_values", new NamedList<>());
- throw x;
}
}
}
@@ -1787,6 +1790,10 @@ public class QueryComponent extends SearchComponent {
}
rb.setResult(result);
+ // Check QueryLimits after main search operation
+ QueryLimits queryLimits = QueryLimits.getCurrentLimits();
+ queryLimits.maybeExitWithPartialResults("QueryComponent process");
+
ResultContext ctx = new BasicResultContext(rb);
rsp.addResponse(ctx);
rsp.getToLog()
@@ -1845,7 +1852,6 @@ public class QueryComponent extends SearchComponent {
this.score = score;
}
- @Override
public int docID() {
return docid;
}
diff --git a/solr/core/src/java/org/apache/solr/handler/component/QueryElevationComponent.java b/solr/core/src/java/org/apache/solr/handler/component/QueryElevationComponent.java
index 155efd7674a..16e7906aea7 100644
--- a/solr/core/src/java/org/apache/solr/handler/component/QueryElevationComponent.java
+++ b/solr/core/src/java/org/apache/solr/handler/component/QueryElevationComponent.java
@@ -764,7 +764,7 @@ public class QueryElevationComponent extends SearchComponent implements SolrCore
// Extract the elevated terms into a list
match = new ArrayList<>(elevation.includeQuery.clauses().size());
for (BooleanClause clause : elevation.includeQuery.clauses()) {
- TermQuery tq = (TermQuery) clause.getQuery();
+ TermQuery tq = (TermQuery) clause.query();
match.add(tq.getTerm().text());
}
}
diff --git a/solr/core/src/java/org/apache/solr/handler/component/RealTimeGetComponent.java b/solr/core/src/java/org/apache/solr/handler/component/RealTimeGetComponent.java
index 4b48198cc3c..5b1b492e4d6 100644
--- a/solr/core/src/java/org/apache/solr/handler/component/RealTimeGetComponent.java
+++ b/solr/core/src/java/org/apache/solr/handler/component/RealTimeGetComponent.java
@@ -331,7 +331,7 @@ public class RealTimeGetComponent extends SearchComponent {
if (rb.getFilters() != null) {
for (Query raw : rb.getFilters()) {
raw = makeQueryable(raw);
- Query q = raw.rewrite(searcherInfo.getSearcher().getIndexReader());
+ Query q = raw.rewrite(searcherInfo.getSearcher());
Scorer scorer =
searcherInfo
.getSearcher()
diff --git a/solr/core/src/java/org/apache/solr/handler/component/SearchHandler.java b/solr/core/src/java/org/apache/solr/handler/component/SearchHandler.java
index 1352164883f..89b8da9802c 100644
--- a/solr/core/src/java/org/apache/solr/handler/component/SearchHandler.java
+++ b/solr/core/src/java/org/apache/solr/handler/component/SearchHandler.java
@@ -750,7 +750,7 @@ public class SearchHandler extends RequestHandlerBase
return "EXECUTE_QUERY";
case STAGE_GET_FIELDS:
return "GET_FIELDS";
- // nobody wants to think it was DONE and canceled after it completed...
+ // nobody wants to think it was DONE and canceled after it completed...
case STAGE_DONE:
return "FINISHING";
default:
diff --git a/solr/core/src/java/org/apache/solr/handler/loader/JsonLoader.java b/solr/core/src/java/org/apache/solr/handler/loader/JsonLoader.java
index ff07a8fb5a9..a5a6feab2cb 100644
--- a/solr/core/src/java/org/apache/solr/handler/loader/JsonLoader.java
+++ b/solr/core/src/java/org/apache/solr/handler/loader/JsonLoader.java
@@ -215,7 +215,7 @@ public class JsonLoader extends ContentStreamLoader {
}
break;
}
- // fall through
+ // fall through
case JSONParser.LONG:
case JSONParser.NUMBER:
diff --git a/solr/core/src/java/org/apache/solr/handler/loader/XMLLoader.java b/solr/core/src/java/org/apache/solr/handler/loader/XMLLoader.java
index 869d4790db9..72d93f87b78 100644
--- a/solr/core/src/java/org/apache/solr/handler/loader/XMLLoader.java
+++ b/solr/core/src/java/org/apache/solr/handler/loader/XMLLoader.java
@@ -300,7 +300,7 @@ public class XMLLoader extends ContentStreamLoader {
deleteCmd.clear();
break;
- // Add everything to the text
+ // Add everything to the text
case XMLStreamConstants.SPACE:
case XMLStreamConstants.CDATA:
case XMLStreamConstants.CHARACTERS:
@@ -356,7 +356,7 @@ public class XMLLoader extends ContentStreamLoader {
while (!complete) {
int event = parser.next();
switch (event) {
- // Add everything to the text
+ // Add everything to the text
case XMLStreamConstants.SPACE:
case XMLStreamConstants.CDATA:
case XMLStreamConstants.CHARACTERS:
diff --git a/solr/core/src/java/org/apache/solr/handler/tagger/TermPrefixCursor.java b/solr/core/src/java/org/apache/solr/handler/tagger/TermPrefixCursor.java
index 8fad2964d9a..8c4a1787e27 100644
--- a/solr/core/src/java/org/apache/solr/handler/tagger/TermPrefixCursor.java
+++ b/solr/core/src/java/org/apache/solr/handler/tagger/TermPrefixCursor.java
@@ -128,7 +128,7 @@ class TermPrefixCursor {
if (termsEnum.next() == null) { // case END
return false;
}
- // fall through to NOT_FOUND
+ // fall through to NOT_FOUND
case NOT_FOUND:
// termsEnum must start with prefixBuf to continue
diff --git a/solr/core/src/java/org/apache/solr/index/SlowCompositeReaderWrapper.java b/solr/core/src/java/org/apache/solr/index/SlowCompositeReaderWrapper.java
index cdfbb181671..918723eb9ba 100644
--- a/solr/core/src/java/org/apache/solr/index/SlowCompositeReaderWrapper.java
+++ b/solr/core/src/java/org/apache/solr/index/SlowCompositeReaderWrapper.java
@@ -26,6 +26,7 @@ import org.apache.lucene.index.ByteVectorValues;
import org.apache.lucene.index.CompositeReader;
import org.apache.lucene.index.DirectoryReader;
import org.apache.lucene.index.DocValues;
+import org.apache.lucene.index.DocValuesSkipper;
import org.apache.lucene.index.DocValuesType;
import org.apache.lucene.index.FieldInfo;
import org.apache.lucene.index.FieldInfos;
@@ -101,7 +102,7 @@ public final class SlowCompositeReaderWrapper extends LeafReader {
} else {
Version minVersion = Version.LATEST;
for (LeafReaderContext leafReaderContext : reader.leaves()) {
- Version leafVersion = leafReaderContext.reader().getMetaData().getMinVersion();
+ Version leafVersion = leafReaderContext.reader().getMetaData().minVersion();
if (leafVersion == null) {
minVersion = null;
break;
@@ -112,9 +113,9 @@ public final class SlowCompositeReaderWrapper extends LeafReader {
LeafMetaData leafMetaData = reader.leaves().get(0).reader().getMetaData();
metaData =
new LeafMetaData(
- leafMetaData.getCreatedVersionMajor(),
+ leafMetaData.createdVersionMajor(),
minVersion,
- leafMetaData.getSort(),
+ leafMetaData.sort(),
leafMetaData.hasBlocks());
}
fieldInfos = FieldInfos.getMergedFieldInfos(in);
@@ -312,10 +313,9 @@ public final class SlowCompositeReaderWrapper extends LeafReader {
return MultiDocValues.getNormValues(in, field); // TODO cache?
}
- @Override
@Deprecated
public Fields getTermVectors(int docID) throws IOException {
- return in.getTermVectors(docID);
+ return in.termVectors().get(docID);
}
@Override
@@ -342,11 +342,10 @@ public final class SlowCompositeReaderWrapper extends LeafReader {
return in.maxDoc();
}
- @Override
@Deprecated
public void document(int docID, StoredFieldVisitor visitor) throws IOException {
ensureOpen();
- in.document(docID, visitor);
+ in.storedFields().document(docID, visitor);
}
@Override
@@ -404,6 +403,12 @@ public final class SlowCompositeReaderWrapper extends LeafReader {
}
}
+ @Override
+ public DocValuesSkipper getDocValuesSkipper(String field) throws IOException {
+ ensureOpen();
+ throw new UnsupportedOperationException();
+ }
+
@Override
public LeafMetaData getMetaData() {
return metaData;
diff --git a/solr/core/src/java/org/apache/solr/internal/csv/CSVPrinter.java b/solr/core/src/java/org/apache/solr/internal/csv/CSVPrinter.java
index 88da81b3a83..e759236a5c2 100644
--- a/solr/core/src/java/org/apache/solr/internal/csv/CSVPrinter.java
+++ b/solr/core/src/java/org/apache/solr/internal/csv/CSVPrinter.java
@@ -97,7 +97,7 @@ public class CSVPrinter {
if (i + 1 < comment.length() && comment.charAt(i + 1) == '\n') {
i++;
}
- // break intentionally excluded.
+ // break intentionally excluded.
case '\n':
println();
out.write(this.strategy.getCommentStart());
diff --git a/solr/core/src/java/org/apache/solr/legacy/LegacyField.java b/solr/core/src/java/org/apache/solr/legacy/LegacyField.java
index fa612425b0f..6441fdb7c5f 100644
--- a/solr/core/src/java/org/apache/solr/legacy/LegacyField.java
+++ b/solr/core/src/java/org/apache/solr/legacy/LegacyField.java
@@ -80,12 +80,12 @@ public class LegacyField extends Field {
return super.tokenStream(analyzer, reuse);
}
- @Override
+ // Note: Field.setTokenStream() was removed in Lucene 10.0
+ // This method is no longer supported and will throw an exception
public void setTokenStream(TokenStream tokenStream) {
- final LegacyFieldType fieldType = (LegacyFieldType) fieldType();
- if (fieldType.numericType() != null) {
- throw new IllegalArgumentException("cannot set private TokenStream on numeric fields");
- }
- super.setTokenStream(tokenStream);
+ throw new UnsupportedOperationException(
+ "Field.setTokenStream() was removed in Lucene 10.0. "
+ + "Either provide two fields (one with a TokenStream and another with a value), "
+ + "or create a sub-class of Field that overrides tokenStream(Analyzer, TokenStream).");
}
}
diff --git a/solr/core/src/java/org/apache/solr/legacy/LegacyNumericRangeQuery.java b/solr/core/src/java/org/apache/solr/legacy/LegacyNumericRangeQuery.java
index 0fbc78e3142..0b0765bef48 100644
--- a/solr/core/src/java/org/apache/solr/legacy/LegacyNumericRangeQuery.java
+++ b/solr/core/src/java/org/apache/solr/legacy/LegacyNumericRangeQuery.java
@@ -198,6 +198,29 @@ public final class LegacyNumericRangeQuery<T extends Number> extends MultiTermQu
this.maxInclusive = maxInclusive;
}
+ /**
+ * Private constructor that accepts a rewrite method. Used by factory methods that need to specify
+ * custom rewrite behavior.
+ */
+ private LegacyNumericRangeQuery(
+ final String field,
+ final int precisionStep,
+ final LegacyNumericType dataType,
+ T min,
+ T max,
+ final boolean minInclusive,
+ final boolean maxInclusive,
+ final MultiTermQuery.RewriteMethod rewriteMethod) {
+ super(field, rewriteMethod);
+ if (precisionStep < 1) throw new IllegalArgumentException("precisionStep must be >=1");
+ this.precisionStep = precisionStep;
+ this.dataType = Objects.requireNonNull(dataType, "LegacyNumericType must not be null");
+ this.min = min;
+ this.max = max;
+ this.minInclusive = minInclusive;
+ this.maxInclusive = maxInclusive;
+ }
+
/**
* Factory that creates a <code>LegacyNumericRangeQuery</code>, that queries a <code>long</code>
* range using the given <a href="#precisionStepDesc"><code>precisionStep</code></a>. You can have
@@ -371,6 +394,58 @@ public final class LegacyNumericRangeQuery<T extends Number> extends MultiTermQu
maxInclusive);
}
+ /**
+ * Factory that creates a <code>LegacyNumericRangeQuery</code>, that queries a <code>long</code>
+ * range using the given <a href="#precisionStepDesc"><code>precisionStep</code></a> and rewrite
+ * method. You can have half-open ranges (which are in fact </≤ or >/≥ queries) by
+ * setting the min or max value to <code>null</code>. By setting inclusive to false, it will match
+ * all documents excluding the bounds, with inclusive on, the boundaries are hits, too.
+ */
+ public static LegacyNumericRangeQuery<Long> newLongRange(
+ final String field,
+ final int precisionStep,
+ Long min,
+ Long max,
+ final boolean minInclusive,
+ final boolean maxInclusive,
+ final MultiTermQuery.RewriteMethod rewriteMethod) {
+ return new LegacyNumericRangeQuery<>(
+ field,
+ precisionStep,
+ LegacyNumericType.LONG,
+ min,
+ max,
+ minInclusive,
+ maxInclusive,
+ rewriteMethod);
+ }
+
+ /**
+ * Factory that creates a <code>LegacyNumericRangeQuery</code>, that queries a <code>int</code>
+ * range using the given <a href="#precisionStepDesc"><code>precisionStep</code></a> and rewrite
+ * method. You can have half-open ranges (which are in fact </≤ or >/≥ queries) by
+ * setting the min or max value to <code>null</code>. By setting inclusive to false, it will match
+ * all documents excluding the bounds, with inclusive on, the boundaries are hits, too.
+ */
+ public static LegacyNumericRangeQuery<Integer> newIntRange(
+ final String field,
+ final int precisionStep,
+ Integer min,
+ Integer max,
+ final boolean minInclusive,
+ final boolean maxInclusive,
+ final MultiTermQuery.RewriteMethod rewriteMethod) {
+ return new LegacyNumericRangeQuery<>(
+ field,
+ precisionStep,
+ LegacyNumericType.INT,
+ min,
+ max,
+ minInclusive,
+ maxInclusive,
+ rewriteMethod);
+ }
+
@Override
@SuppressWarnings("unchecked")
protected TermsEnum getTermsEnum(final Terms terms, AttributeSource atts) throws IOException {
diff --git a/solr/core/src/java/org/apache/solr/parser/QueryParser.java b/solr/core/src/java/org/apache/solr/parser/QueryParser.java
index 9feb2d1c68d..ccd686b4098 100644
--- a/solr/core/src/java/org/apache/solr/parser/QueryParser.java
+++ b/solr/core/src/java/org/apache/solr/parser/QueryParser.java
@@ -243,8 +243,8 @@ addClause(clauses, conj, mods, q);
}
}
}
-if (clauses.size() == 1 && clauses.get(0).getOccur() == BooleanClause.Occur.SHOULD) {
- Query firstQuery = clauses.get(0).getQuery();
+if (clauses.size() == 1 && clauses.get(0).occur() == BooleanClause.Occur.SHOULD) {
+ Query firstQuery = clauses.get(0).query();
if ( ! (firstQuery instanceof RawQuery) || ((RawQuery)firstQuery).getTermCount() == 1) {
{if ("" != null) return rawToNormal(firstQuery);}
}
diff --git a/solr/core/src/java/org/apache/solr/parser/QueryParser.jj b/solr/core/src/java/org/apache/solr/parser/QueryParser.jj
index 25a3238dca3..ddcd7afc676 100644
--- a/solr/core/src/java/org/apache/solr/parser/QueryParser.jj
+++ b/solr/core/src/java/org/apache/solr/parser/QueryParser.jj
@@ -228,8 +228,8 @@ Query Query(String field) throws SyntaxError :
{ addClause(clauses, conj, mods, q); }
)*
{
- if (clauses.size() == 1 && clauses.get(0).getOccur() == BooleanClause.Occur.SHOULD) {
- Query firstQuery = clauses.get(0).getQuery();
+ if (clauses.size() == 1 && clauses.get(0).occur() == BooleanClause.Occur.SHOULD) {
+ Query firstQuery = clauses.get(0).query();
if ( ! (firstQuery instanceof RawQuery) || ((RawQuery)firstQuery).getTermCount() == 1) {
return rawToNormal(firstQuery);
}
diff --git a/solr/core/src/java/org/apache/solr/parser/QueryParserConstants.java b/solr/core/src/java/org/apache/solr/parser/QueryParserConstants.java
index cab24e5aa94..8b52abc9aeb 100644
--- a/solr/core/src/java/org/apache/solr/parser/QueryParserConstants.java
+++ b/solr/core/src/java/org/apache/solr/parser/QueryParserConstants.java
@@ -89,7 +89,6 @@ public interface QueryParserConstants {
int DEFAULT = 3;
/** Literal token values. */
- @SuppressWarnings("MutablePublicArray")
String[] tokenImage = {
"<EOF>",
"<_NUM_CHAR>",
diff --git a/solr/core/src/java/org/apache/solr/parser/SolrQueryParserBase.java b/solr/core/src/java/org/apache/solr/parser/SolrQueryParserBase.java
index 568856fcfe2..4ad353d2730 100644
--- a/solr/core/src/java/org/apache/solr/parser/SolrQueryParserBase.java
+++ b/solr/core/src/java/org/apache/solr/parser/SolrQueryParserBase.java
@@ -56,6 +56,7 @@ import org.apache.lucene.util.QueryBuilder;
import org.apache.lucene.util.automaton.Automata;
import org.apache.lucene.util.automaton.Automaton;
import org.apache.lucene.util.automaton.Operations;
+import org.apache.lucene.util.automaton.RegExp;
import org.apache.solr.analysis.ReversedWildcardFilterFactory;
import org.apache.solr.analysis.TokenizerChain;
import org.apache.solr.common.SolrException;
@@ -459,7 +460,7 @@ public abstract class SolrQueryParserBase extends QueryBuilder {
if (clauses.size() > 0 && conj == CONJ_AND) {
BooleanClause c = clauses.get(clauses.size() - 1);
if (!c.isProhibited())
- clauses.set(clauses.size() - 1, new BooleanClause(c.getQuery(), BooleanClause.Occur.MUST));
+ clauses.set(clauses.size() - 1, new BooleanClause(c.query(), BooleanClause.Occur.MUST));
}
if (clauses.size() > 0 && operator == AND_OPERATOR && conj == CONJ_OR) {
@@ -469,8 +470,7 @@ public abstract class SolrQueryParserBase extends QueryBuilder {
// this modification a OR b would parsed as +a OR b
BooleanClause c = clauses.get(clauses.size() - 1);
if (!c.isProhibited())
- clauses.set(
- clauses.size() - 1, new BooleanClause(c.getQuery(), BooleanClause.Occur.SHOULD));
+ clauses.set(clauses.size() - 1, new BooleanClause(c.query(), BooleanClause.Occur.SHOULD));
}
// We might have been passed a null query; the term might have been
@@ -598,9 +598,19 @@ public abstract class SolrQueryParserBase extends QueryBuilder {
* @return new RegexpQuery instance
*/
protected Query newRegexpQuery(Term regexp) {
- RegexpQuery query = new RegexpQuery(regexp);
SchemaField sf = schema.getField(regexp.field());
- query.setRewriteMethod(sf.getType().getRewriteMethod(parser, sf));
+ int flags = RegExp.ALL;
+ if (parser.getParams().getBool("allowDeprecatedRegexpComplement", false)) {
+ flags |= RegExp.DEPRECATED_COMPLEMENT;
+ }
+ RegexpQuery query =
+ new RegexpQuery(
+ regexp,
+ flags,
+ 0,
+ RegexpQuery.DEFAULT_PROVIDER,
+ Operations.DEFAULT_DETERMINIZE_WORK_LIMIT,
+ sf.getType().getRewriteMethod(parser, sf));
return query;
}
@@ -630,7 +640,7 @@ public abstract class SolrQueryParserBase extends QueryBuilder {
case PICK_BEST:
List<Query> currPosnClauses = new ArrayList<>(terms.length);
for (TermAndBoost term : terms) {
- currPosnClauses.add(newTermQuery(new Term(field, term.term), term.boost));
+ currPosnClauses.add(newTermQuery(new Term(field, term.term()), term.boost()));
}
DisjunctionMaxQuery dm = new DisjunctionMaxQuery(currPosnClauses, 0.0f);
return dm;
@@ -638,7 +648,7 @@ public abstract class SolrQueryParserBase extends QueryBuilder {
BooleanQuery.Builder builder = new BooleanQuery.Builder();
for (TermAndBoost term : terms) {
builder.add(
- newTermQuery(new Term(field, term.term), term.boost), BooleanClause.Occur.SHOULD);
+ newTermQuery(new Term(field, term.term()), term.boost()), BooleanClause.Occur.SHOULD);
}
return builder.build();
case AS_SAME_TERM:
@@ -681,9 +691,12 @@ public abstract class SolrQueryParserBase extends QueryBuilder {
* @return new WildcardQuery instance
*/
protected Query newWildcardQuery(Term t) {
- WildcardQuery query = new WildcardQuery(t);
SchemaField sf = schema.getField(t.field());
- query.setRewriteMethod(sf.getType().getRewriteMethod(parser, sf));
+ WildcardQuery query =
+ new WildcardQuery(
+ t,
+ Operations.DEFAULT_DETERMINIZE_WORK_LIMIT,
+ sf.getType().getRewriteMethod(parser, sf));
return query;
}
@@ -708,8 +721,8 @@ public abstract class SolrQueryParserBase extends QueryBuilder {
boolean onlyRawQueries = true;
int allRawQueriesTermCount = 0;
for (BooleanClause clause : clauses) {
- if (clause.getQuery() instanceof RawQuery) {
- allRawQueriesTermCount += ((RawQuery) clause.getQuery()).getTermCount();
+ if (clause.query() instanceof RawQuery) {
+ allRawQueriesTermCount += ((RawQuery) clause.query()).getTermCount();
} else {
onlyRawQueries = false;
}
@@ -721,12 +734,12 @@ public abstract class SolrQueryParserBase extends QueryBuilder {
Map<SchemaField, List<RawQuery>> fmap = new HashMap<>();
for (BooleanClause clause : clauses) {
- Query subq = clause.getQuery();
+ Query subq = clause.query();
if (subq instanceof RawQuery) {
- if (clause.getOccur() != BooleanClause.Occur.SHOULD) {
+ if (clause.occur() != BooleanClause.Occur.SHOULD) {
// We only collect optional terms for set queries. Since this isn't optional,
// convert the raw query to a normal query and handle as usual.
- clause = new BooleanClause(rawToNormal(subq), clause.getOccur());
+ clause = new BooleanClause(rawToNormal(subq), clause.occur());
} else {
// Optional raw query.
RawQuery rawq = (RawQuery) subq;
@@ -749,7 +762,7 @@ public abstract class SolrQueryParserBase extends QueryBuilder {
continue;
}
- clause = new BooleanClause(rawToNormal(subq), clause.getOccur());
+ clause = new BooleanClause(rawToNormal(subq), clause.occur());
}
}
@@ -811,8 +824,8 @@ public abstract class SolrQueryParserBase extends QueryBuilder {
BooleanQuery bq = QueryUtils.build(booleanBuilder, parser);
if (bq.clauses().size() == 1) { // Unwrap single SHOULD query
BooleanClause clause = bq.clauses().iterator().next();
- if (clause.getOccur() == BooleanClause.Occur.SHOULD) {
- return clause.getQuery();
+ if (clause.occur() == BooleanClause.Occur.SHOULD) {
+ return clause.query();
}
}
return bq;
@@ -1290,7 +1303,8 @@ public abstract class SolrQueryParserBase extends QueryBuilder {
if (factory != null) {
Term term = new Term(field, termStr);
// fsa representing the query
- Automaton automaton = WildcardQuery.toAutomaton(term);
+ Automaton automaton =
+ WildcardQuery.toAutomaton(term, Operations.DEFAULT_DETERMINIZE_WORK_LIMIT);
// TODO: we should likely use the automaton to calculate shouldReverse, too.
if (factory.shouldReverse(termStr)) {
automaton = Operations.concatenate(automaton, Automata.makeChar(factory.getMarkerChar()));
@@ -1305,6 +1319,7 @@ public abstract class SolrQueryParserBase extends QueryBuilder {
automaton =
Operations.minus(automaton, falsePositives, Operations.DEFAULT_DETERMINIZE_WORK_LIMIT);
}
+ automaton = Operations.determinize(automaton, Operations.DEFAULT_DETERMINIZE_WORK_LIMIT);
return new AutomatonQuery(term, automaton) {
// override toString so it's completely transparent
@Override
diff --git a/solr/core/src/java/org/apache/solr/query/FilterQuery.java b/solr/core/src/java/org/apache/solr/query/FilterQuery.java
index 8af5a5a51ee..4ec4bdb388e 100644
--- a/solr/core/src/java/org/apache/solr/query/FilterQuery.java
+++ b/solr/core/src/java/org/apache/solr/query/FilterQuery.java
@@ -17,7 +17,6 @@
package org.apache.solr.query;
import java.io.IOException;
-import org.apache.lucene.index.IndexReader;
import org.apache.lucene.search.BooleanClause;
import org.apache.lucene.search.ConstantScoreQuery;
import org.apache.lucene.search.IndexSearcher;
@@ -104,8 +103,8 @@ public class FilterQuery extends ExtendedQueryBase {
}
@Override
- public Query rewrite(IndexReader reader) throws IOException {
- Query newQ = q.rewrite(reader);
+ public Query rewrite(IndexSearcher searcher) throws IOException {
+ Query newQ = q.rewrite(searcher);
if (!newQ.equals(q)) {
return new FilterQuery(newQ);
} else {
diff --git a/solr/core/src/java/org/apache/solr/query/SolrRangeQuery.java b/solr/core/src/java/org/apache/solr/query/SolrRangeQuery.java
index c9c6af65ce2..54ada3839dc 100644
--- a/solr/core/src/java/org/apache/solr/query/SolrRangeQuery.java
+++ b/solr/core/src/java/org/apache/solr/query/SolrRangeQuery.java
@@ -22,7 +22,6 @@ import java.util.List;
import java.util.Objects;
import org.apache.lucene.index.BaseTermsEnum;
import org.apache.lucene.index.ImpactsEnum;
-import org.apache.lucene.index.IndexReader;
import org.apache.lucene.index.LeafReaderContext;
import org.apache.lucene.index.PostingsEnum;
import org.apache.lucene.index.Term;
@@ -32,7 +31,6 @@ import org.apache.lucene.index.Terms;
import org.apache.lucene.index.TermsEnum;
import org.apache.lucene.search.BooleanClause;
import org.apache.lucene.search.BooleanQuery;
-import org.apache.lucene.search.BulkScorer;
import org.apache.lucene.search.ConstantScoreQuery;
import org.apache.lucene.search.ConstantScoreScorer;
import org.apache.lucene.search.ConstantScoreWeight;
@@ -45,6 +43,7 @@ import org.apache.lucene.search.Query;
import org.apache.lucene.search.QueryVisitor;
import org.apache.lucene.search.ScoreMode;
import org.apache.lucene.search.Scorer;
+import org.apache.lucene.search.ScorerSupplier;
import org.apache.lucene.search.TermQuery;
import org.apache.lucene.search.Weight;
import org.apache.lucene.util.AttributeSource;
@@ -157,7 +156,7 @@ public final class SolrRangeQuery extends ExtendedQueryBase implements DocSetPro
}
@Override
- public Query rewrite(IndexReader reader) throws IOException {
+ public Query rewrite(IndexSearcher searcher) throws IOException {
return this;
}
@@ -529,30 +528,59 @@ public final class SolrRangeQuery extends ExtendedQueryBase implements DocSetPro
if (disi == null) {
return null;
}
- return new ConstantScoreScorer(this, score(), scoreMode, disi);
+ return new ConstantScoreScorer(score(), scoreMode, disi);
}
+ // Note: bulkScorer override removed as Weight.bulkScorer is now final in Lucene 10
+ // The default implementation in Weight will be used instead
+
@Override
- public BulkScorer bulkScorer(LeafReaderContext context) throws IOException {
+ public ScorerSupplier scorerSupplier(LeafReaderContext context) throws IOException {
final SegState weightOrBitSet = getSegState(context);
+
+ // Check for no-match conditions before creating ScorerSupplier
if (weightOrBitSet.weight != null) {
- return weightOrBitSet.weight.bulkScorer(context);
+ ScorerSupplier supplier = weightOrBitSet.weight.scorerSupplier(context);
+ if (supplier == null) {
+ return null;
+ }
+
+ return new ScorerSupplier() {
+ @Override
+ public Scorer get(long leadCost) throws IOException {
+ return supplier.get(leadCost);
+ }
+
+ @Override
+ public long cost() {
+ return supplier.cost();
+ }
+ };
} else {
- final Scorer scorer = scorer(weightOrBitSet.set);
+ Scorer scorer = scorer(weightOrBitSet.set);
if (scorer == null) {
return null;
}
- return new DefaultBulkScorer(scorer);
- }
- }
- @Override
- public Scorer scorer(LeafReaderContext context) throws IOException {
- final SegState weightOrBitSet = getSegState(context);
- if (weightOrBitSet.weight != null) {
- return weightOrBitSet.weight.scorer(context);
- } else {
- return scorer(weightOrBitSet.set);
+ return new ScorerSupplier() {
+ @Override
+ public Scorer get(long leadCost) throws IOException {
+ return scorer;
+ }
+
+ @Override
+ public long cost() {
+ if (weightOrBitSet.set != null) {
+ try {
+ DocIdSetIterator iter = weightOrBitSet.set.iterator();
+ return iter != null ? iter.cost() : 0;
+ } catch (IOException e) {
+ return 0;
+ }
+ }
+ return 0;
+ }
+ };
}
}
diff --git a/solr/core/src/java/org/apache/solr/request/DocValuesFacets.java b/solr/core/src/java/org/apache/solr/request/DocValuesFacets.java
index b76bca4a3a1..47089df1a72 100644
--- a/solr/core/src/java/org/apache/solr/request/DocValuesFacets.java
+++ b/solr/core/src/java/org/apache/solr/request/DocValuesFacets.java
@@ -415,15 +415,15 @@ public class DocValuesFacets {
int doc;
while ((doc = disi.nextDoc()) != DocIdSetIterator.NO_MORE_DOCS) {
if (si.advanceExact(doc)) {
- // strange do-while to collect the missing count (first ord is NO_MORE_ORDS)
- int term = (int) si.nextOrd();
- do {
+ // strange do-while to collect the missing count (negative ords indicate no more values)
+ for (int i = 0; i < si.docValueCount(); i++) {
+ int term = (int) si.nextOrd();
if (map != null) {
term = (int) ordMap.get(term);
}
int arrIdx = term - startTermIndex;
if (arrIdx >= 0 && arrIdx < counts.length) counts[arrIdx]++;
- } while ((term = (int) si.nextOrd()) >= 0);
+ }
} else if (startTermIndex == -1) {
counts[0]++; // missing count
}
@@ -448,10 +448,10 @@ public class DocValuesFacets {
int doc;
while ((doc = disi.nextDoc()) != DocIdSetIterator.NO_MORE_DOCS) {
if (si.advanceExact(doc)) {
- int term = (int) si.nextOrd();
- do {
+ for (int i = 0; i < si.docValueCount(); i++) {
+ int term = (int) si.nextOrd();
segCounts[1 + term]++;
- } while ((term = (int) si.nextOrd()) >= 0);
+ }
} else {
counts[0]++; // missing
}
diff --git a/solr/core/src/java/org/apache/solr/request/DocValuesStats.java b/solr/core/src/java/org/apache/solr/request/DocValuesStats.java
index 74906bd0250..af969f6b176 100644
--- a/solr/core/src/java/org/apache/solr/request/DocValuesStats.java
+++ b/solr/core/src/java/org/apache/solr/request/DocValuesStats.java
@@ -221,8 +221,8 @@ public class DocValuesStats {
si.advance(doc);
}
if (doc == si.docID()) {
- long ord;
- while ((ord = si.nextOrd()) != SortedSetDocValues.NO_MORE_ORDS) {
+ for (int i = 0; i < si.docValueCount(); i++) {
+ long ord = si.nextOrd();
int term = (int) ord;
if (map != null) {
term = (int) ordMap.get(term);
diff --git a/solr/core/src/java/org/apache/solr/request/IntervalFacets.java b/solr/core/src/java/org/apache/solr/request/IntervalFacets.java
index ad048ae95f4..6535673f823 100644
--- a/solr/core/src/java/org/apache/solr/request/IntervalFacets.java
+++ b/solr/core/src/java/org/apache/solr/request/IntervalFacets.java
@@ -299,6 +299,7 @@ public class IntervalFacets implements Iterable<FacetInterval> {
if (sub == null) {
continue;
}
+
final SortedDocValues singleton = DocValues.unwrapSingleton(sub);
if (singleton != null) {
// some codecs may optimize SORTED_SET storage for single-valued fields
@@ -322,36 +323,19 @@ public class IntervalFacets implements Iterable<FacetInterval> {
assert longs.docID() != -1;
final int docValueCount = longs.docValueCount();
assert docValueCount > 0 : "Should have at least one value for this document";
- int currentInterval = 0;
+ // Track which intervals have already been counted for this document
+ boolean[] intervalCounted = new boolean[intervals.length];
for (int i = 0; i < docValueCount; i++) {
- boolean evaluateNextInterval = true;
long value = longs.nextValue();
- while (evaluateNextInterval && currentInterval < intervals.length) {
- IntervalCompareResult result = intervals[currentInterval].includes(value);
- switch (result) {
- case INCLUDED:
- /*
- * Increment the current interval and move to the next one using
- * the same value
- */
- intervals[currentInterval].incCount();
- currentInterval++;
- break;
- case LOWER_THAN_START:
- /*
- * None of the next intervals will match this value (all of them have
- * higher start value). Move to the next value for this document.
- */
- evaluateNextInterval = false;
- break;
- case GREATER_THAN_END:
- /*
- * Next interval may match this value
- */
- currentInterval++;
- break;
+ // Check against all intervals for this value, but only count each interval once per document
+ for (int intervalIdx = 0; intervalIdx < intervals.length; intervalIdx++) {
+ if (!intervalCounted[intervalIdx]) {
+ IntervalCompareResult result = intervals[intervalIdx].includes(value);
+ if (result == IntervalCompareResult.INCLUDED) {
+ intervals[intervalIdx].incCount();
+ intervalCounted[intervalIdx] = true; // Mark this interval as counted for this document
+ }
}
- // Maybe return if currentInterval == intervals.length?
}
}
}
@@ -369,34 +353,22 @@ public class IntervalFacets implements Iterable<FacetInterval> {
ssdv.advance(doc);
}
if (doc == ssdv.docID()) {
- long currOrd;
- int currentInterval = 0;
- while ((currOrd = ssdv.nextOrd()) != SortedSetDocValues.NO_MORE_ORDS) {
- boolean evaluateNextInterval = true;
- while (evaluateNextInterval && currentInterval < intervals.length) {
- IntervalCompareResult result = intervals[currentInterval].includes(currOrd);
- switch (result) {
- case INCLUDED:
- /*
- * Increment the current interval and move to the next one using
- * the same value
- */
- intervals[currentInterval].incCount();
- currentInterval++;
- break;
- case LOWER_THAN_START:
- /*
- * None of the next intervals will match this value (all of them have
- * higher start value). Move to the next value for this document.
- */
- evaluateNextInterval = false;
- break;
- case GREATER_THAN_END:
- /*
- * Next interval may match this value
- */
- currentInterval++;
- break;
+ // Track which intervals have been counted for this document
+ boolean[] intervalCounted = new boolean[intervals.length];
+
+ // Process all ordinals for this document
+ for (int i = 0; i < ssdv.docValueCount(); i++) {
+ long currOrd = ssdv.nextOrd();
+
+ // Check this ordinal against all intervals
+ for (int intervalIdx = 0; intervalIdx < intervals.length; intervalIdx++) {
+ // Only count each interval once per document
+ if (!intervalCounted[intervalIdx]) {
+ IntervalCompareResult result = intervals[intervalIdx].includes(currOrd);
+ if (result == IntervalCompareResult.INCLUDED) {
+ intervals[intervalIdx].incCount();
+ intervalCounted[intervalIdx] = true;
+ }
}
}
}
diff --git a/solr/core/src/java/org/apache/solr/request/SimpleFacets.java b/solr/core/src/java/org/apache/solr/request/SimpleFacets.java
index b5ea0b66eb6..f2a62c84900 100644
--- a/solr/core/src/java/org/apache/solr/request/SimpleFacets.java
+++ b/solr/core/src/java/org/apache/solr/request/SimpleFacets.java
@@ -335,6 +335,7 @@ public class SimpleFacets {
}
AllGroupsCollector<?> collector = new AllGroupsCollector<>(new TermGroupSelector(groupField));
+ // Use deprecated search method for non-parallel search
searcher.search(QueryUtils.combineQueryAndFilter(facetQuery, docSet.makeQuery()), collector);
return collector.getGroupCount();
}
@@ -819,11 +820,11 @@ public class SimpleFacets {
result.getFacetEntries(offset, limit < 0 ? Integer.MAX_VALUE : limit);
for (GroupFacetCollector.FacetEntry facetEntry : scopedEntries) {
// :TODO:can we filter earlier than this to make it more efficient?
- if (termFilter != null && !termFilter.test(facetEntry.getValue())) {
+ if (termFilter != null && !termFilter.test(facetEntry.value())) {
continue;
}
- facetFieldType.indexedToReadable(facetEntry.getValue(), charsRef);
- facetCounts.add(charsRef.toString(), facetEntry.getCount());
+ facetFieldType.indexedToReadable(facetEntry.value(), charsRef);
+ facetCounts.add(charsRef.toString(), facetEntry.count());
}
if (missing) {
@@ -915,8 +916,17 @@ public class SimpleFacets {
result.add(key, getTermCounts(facetValue, parsed));
}
return result;
- } catch (SolrException | ExitableDirectoryReader.ExitingReaderException se) {
+ } catch (SolrException se) {
throw se;
+ } catch (ExitableDirectoryReader.ExitingReaderException ex) {
+ log.warn("Query timed out during facet.field: {}", facetValue, ex);
+ // Set partial results flag for timeout handling in distributed search
+ if (rb != null && rb.rsp != null) {
+ rb.rsp.setPartialResults(rb.req);
+ }
+ NamedList<Object> result = new SimpleOrderedMap<>();
+ result.add(key, new SimpleOrderedMap<>());
+ return result;
} catch (Exception e) {
throw new SolrException(
ErrorCode.SERVER_ERROR, "Exception during facet.field: " + facetValue, e);
@@ -1184,7 +1194,7 @@ public class SimpleFacets {
for (int subindex = 0; subindex < numSubs; subindex++) {
MultiPostingsEnum.EnumWithSlice sub = subs[subindex];
if (sub.postingsEnum == null) continue;
- int base = sub.slice.start;
+ int base = sub.slice.start();
int docid;
while ((docid = sub.postingsEnum.nextDoc()) != DocIdSetIterator.NO_MORE_DOCS) {
if (fastForRandomSet.get(docid + base)) {
diff --git a/solr/core/src/java/org/apache/solr/response/SchemaXmlWriter.java b/solr/core/src/java/org/apache/solr/response/SchemaXmlWriter.java
index 7ea7509564b..9d334838257 100644
--- a/solr/core/src/java/org/apache/solr/response/SchemaXmlWriter.java
+++ b/solr/core/src/java/org/apache/solr/response/SchemaXmlWriter.java
@@ -159,16 +159,16 @@ public class SchemaXmlWriter extends TextResponseWriter {
Object fieldTypePropValue = fieldTypeProperty.getValue();
switch (fieldTypePropName) {
- case FieldType.ANALYZER -> analyzerProperties =
- (SimpleOrderedMap<Object>) fieldTypePropValue;
- case FieldType.INDEX_ANALYZER -> indexAnalyzerProperties =
- (SimpleOrderedMap<Object>) fieldTypePropValue;
- case FieldType.QUERY_ANALYZER -> queryAnalyzerProperties =
- (SimpleOrderedMap<Object>) fieldTypePropValue;
- case FieldType.MULTI_TERM_ANALYZER -> multiTermAnalyzerProperties =
- (SimpleOrderedMap<Object>) fieldTypePropValue;
- case FieldType.SIMILARITY -> perFieldSimilarityProperties =
- (SimpleOrderedMap<Object>) fieldTypePropValue;
+ case FieldType.ANALYZER ->
+ analyzerProperties = (SimpleOrderedMap<Object>) fieldTypePropValue;
+ case FieldType.INDEX_ANALYZER ->
+ indexAnalyzerProperties = (SimpleOrderedMap<Object>) fieldTypePropValue;
+ case FieldType.QUERY_ANALYZER ->
+ queryAnalyzerProperties = (SimpleOrderedMap<Object>) fieldTypePropValue;
+ case FieldType.MULTI_TERM_ANALYZER ->
+ multiTermAnalyzerProperties = (SimpleOrderedMap<Object>) fieldTypePropValue;
+ case FieldType.SIMILARITY ->
+ perFieldSimilarityProperties = (SimpleOrderedMap<Object>) fieldTypePropValue;
default -> writeAttr(fieldTypePropName, fieldTypePropValue.toString());
}
}
@@ -229,8 +229,8 @@ public class SchemaXmlWriter extends TextResponseWriter {
String name = analyzerProperty.getKey();
Object value = analyzerProperty.getValue();
switch (name) {
- case FieldType.CHAR_FILTERS -> charFilterPropertiesList =
- (List<SimpleOrderedMap<Object>>) value;
+ case FieldType.CHAR_FILTERS ->
+ charFilterPropertiesList = (List<SimpleOrderedMap<Object>>) value;
case FieldType.TOKENIZER -> tokenizerProperties = (SimpleOrderedMap<Object>) value;
case FieldType.FILTERS -> filterPropertiesList = (List<SimpleOrderedMap<Object>>) value;
case FieldType.CLASS_NAME -> {
diff --git a/solr/core/src/java/org/apache/solr/response/transform/ChildDocTransformerFactory.java b/solr/core/src/java/org/apache/solr/response/transform/ChildDocTransformerFactory.java
index 98f88f0e21e..be81540a169 100644
--- a/solr/core/src/java/org/apache/solr/response/transform/ChildDocTransformerFactory.java
+++ b/solr/core/src/java/org/apache/solr/response/transform/ChildDocTransformerFactory.java
@@ -22,7 +22,7 @@ import java.io.IOException;
import java.io.UncheckedIOException;
import org.apache.lucene.search.BooleanClause;
import org.apache.lucene.search.BooleanQuery;
-import org.apache.lucene.search.DocValuesFieldExistsQuery;
+import org.apache.lucene.search.FieldExistsQuery;
import org.apache.lucene.search.MatchAllDocsQuery;
import org.apache.lucene.search.Query;
import org.apache.lucene.search.join.BitSetProducer;
@@ -67,8 +67,7 @@ public class ChildDocTransformerFactory extends TransformerFactory {
.add(new BooleanClause(new MatchAllDocsQuery(), BooleanClause.Occur.MUST))
.add(
new BooleanClause(
- new DocValuesFieldExistsQuery(NEST_PATH_FIELD_NAME),
- BooleanClause.Occur.MUST_NOT))
+ new FieldExistsQuery(NEST_PATH_FIELD_NAME), BooleanClause.Occur.MUST_NOT))
.build();
public static final String CACHE_NAME = "perSegFilter";
diff --git a/solr/core/src/java/org/apache/solr/response/transform/ValueSourceAugmenter.java b/solr/core/src/java/org/apache/solr/response/transform/ValueSourceAugmenter.java
index 21d1434b64e..9adcd476969 100644
--- a/solr/core/src/java/org/apache/solr/response/transform/ValueSourceAugmenter.java
+++ b/solr/core/src/java/org/apache/solr/response/transform/ValueSourceAugmenter.java
@@ -173,11 +173,6 @@ public class ValueSourceAugmenter extends DocTransformer {
int docBase;
int localDocId;
-
- @Override
- public int docID() {
- return localDocId;
- }
}
/** Always returns true */
@@ -202,7 +197,6 @@ public class ValueSourceAugmenter extends DocTransformer {
this.score = score;
}
- @Override
public int docID() {
return docid;
}
diff --git a/solr/core/src/java/org/apache/solr/schema/AbstractSpatialFieldType.java b/solr/core/src/java/org/apache/solr/schema/AbstractSpatialFieldType.java
index d92acef8233..d17770c2b06 100644
--- a/solr/core/src/java/org/apache/solr/schema/AbstractSpatialFieldType.java
+++ b/solr/core/src/java/org/apache/solr/schema/AbstractSpatialFieldType.java
@@ -362,9 +362,8 @@ public abstract class AbstractSpatialFieldType<T extends SpatialStrategy> extend
@Override
protected Query getSpecializedExistenceQuery(QParser parser, SchemaField field) {
- PrefixQuery query = new PrefixQuery(new Term(field.getName(), ""));
- query.setRewriteMethod(field.getType().getRewriteMethod(parser, field));
- return query;
+ return new PrefixQuery(
+ new Term(field.getName(), ""), field.getType().getRewriteMethod(parser, field));
}
@Override
diff --git a/solr/core/src/java/org/apache/solr/schema/BBoxField.java b/solr/core/src/java/org/apache/solr/schema/BBoxField.java
index 1e7155f61b7..4b85573ad73 100644
--- a/solr/core/src/java/org/apache/solr/schema/BBoxField.java
+++ b/solr/core/src/java/org/apache/solr/schema/BBoxField.java
@@ -170,7 +170,7 @@ public class BBoxField extends AbstractSpatialFieldType<BBoxStrategy> implements
}
switch (scoreParam) {
- // TODO move these to superclass after LUCENE-5804 ?
+ // TODO move these to superclass after LUCENE-5804 ?
case OVERLAP_RATIO:
double queryTargetProportion = 0.25; // Suggested default; weights towards target area
diff --git a/solr/core/src/java/org/apache/solr/schema/CurrencyFieldType.java b/solr/core/src/java/org/apache/solr/schema/CurrencyFieldType.java
index 1b4bf4574ba..54b00a5d12d 100644
--- a/solr/core/src/java/org/apache/solr/schema/CurrencyFieldType.java
+++ b/solr/core/src/java/org/apache/solr/schema/CurrencyFieldType.java
@@ -32,7 +32,7 @@ import org.apache.lucene.queries.function.ValueSource;
import org.apache.lucene.search.BooleanClause.Occur;
import org.apache.lucene.search.BooleanQuery;
import org.apache.lucene.search.ConstantScoreQuery;
-import org.apache.lucene.search.DocValuesFieldExistsQuery;
+import org.apache.lucene.search.FieldExistsQuery;
import org.apache.lucene.search.Query;
import org.apache.lucene.search.SortField;
import org.apache.lucene.util.ResourceLoader;
@@ -387,7 +387,7 @@ public class CurrencyFieldType extends FieldType implements SchemaAware, Resourc
(p1 != null) ? p1.getCurrencyCode() : (p2 != null) ? p2.getCurrencyCode() : defaultCurrency;
// ValueSourceRangeFilter doesn't check exists(), so we have to
- final Query docsWithValues = new DocValuesFieldExistsQuery(getAmountField(field).getName());
+ final Query docsWithValues = new FieldExistsQuery(getAmountField(field).getName());
final Query vsRangeFilter =
new ValueSourceRangeFilter(
new RawCurrencyValueSource(field, currencyCode, parser),
diff --git a/solr/core/src/java/org/apache/solr/schema/FieldType.java b/solr/core/src/java/org/apache/solr/schema/FieldType.java
index 472f6b4775c..2f922473e50 100644
--- a/solr/core/src/java/org/apache/solr/schema/FieldType.java
+++ b/solr/core/src/java/org/apache/solr/schema/FieldType.java
@@ -47,10 +47,9 @@ import org.apache.lucene.index.Term;
import org.apache.lucene.queries.function.ValueSource;
import org.apache.lucene.search.BooleanClause;
import org.apache.lucene.search.BooleanQuery;
-import org.apache.lucene.search.DocValuesFieldExistsQuery;
import org.apache.lucene.search.DocValuesRewriteMethod;
+import org.apache.lucene.search.FieldExistsQuery;
import org.apache.lucene.search.MultiTermQuery;
-import org.apache.lucene.search.NormsFieldExistsQuery;
import org.apache.lucene.search.PrefixQuery;
import org.apache.lucene.search.Query;
import org.apache.lucene.search.SortField;
@@ -483,8 +482,8 @@ public abstract class FieldType extends FieldProperties {
if (termStr != null && termStr.isEmpty()) {
return getExistenceQuery(parser, sf);
}
- PrefixQuery query = new PrefixQuery(new Term(sf.getName(), termStr));
- query.setRewriteMethod(sf.getType().getRewriteMethod(parser, sf));
+ PrefixQuery query =
+ new PrefixQuery(new Term(sf.getName(), termStr), sf.getType().getRewriteMethod(parser, sf));
QueryUtils.ensurePrefixQueryObeysMinimumPrefixLength(parser, query, termStr);
return query;
}
@@ -1022,8 +1021,7 @@ public abstract class FieldType extends FieldProperties {
* to an unbounded rangeQuery.
*
* <p>This method should only be overridden whenever a fieldType does not support {@link
- * org.apache.lucene.search.DocValuesFieldExistsQuery} or {@link
- * org.apache.lucene.search.NormsFieldExistsQuery}. If a fieldType does not support an unbounded
+ * org.apache.lucene.search.FieldExistsQuery}. If a fieldType does not support an unbounded
* rangeQuery as an existenceQuery (such as <code>double</code> or <code>float</code> fields),
* {@link #getSpecializedExistenceQuery} should be overridden.
*
@@ -1033,10 +1031,10 @@ public abstract class FieldType extends FieldProperties {
*/
public Query getExistenceQuery(QParser parser, SchemaField field) {
if (field.hasDocValues()) {
- return new DocValuesFieldExistsQuery(field.getName());
+ return new FieldExistsQuery(field.getName());
} else if (!field.omitNorms()
&& !isPointField()) { // TODO: Remove !isPointField() for SOLR-14199
- return new NormsFieldExistsQuery(field.getName());
+ return new FieldExistsQuery(field.getName());
} else {
// Default to an unbounded range query
return getSpecializedExistenceQuery(parser, field);
diff --git a/solr/core/src/java/org/apache/solr/schema/FieldTypePluginLoader.java b/solr/core/src/java/org/apache/solr/schema/FieldTypePluginLoader.java
index 0551f9af6eb..523baa288d6 100644
--- a/solr/core/src/java/org/apache/solr/schema/FieldTypePluginLoader.java
+++ b/solr/core/src/java/org/apache/solr/schema/FieldTypePluginLoader.java
@@ -442,14 +442,6 @@ public final class FieldTypePluginLoader extends AbstractPluginLoader<FieldType>
? SolrConfig.parseLuceneVersionString(configuredVersion)
: schema.getDefaultLuceneMatchVersion();
- if (!version.onOrAfter(Version.LUCENE_8_0_0)) {
- log.warn(
- "{} is using deprecated {}"
- + " emulation. You should at some point declare and reindex to at least 8.0, because "
- + "7.x emulation is deprecated and will be removed in 9.0",
- pluginClassName,
- version);
- }
return version;
}
}
diff --git a/solr/core/src/java/org/apache/solr/schema/PreAnalyzedField.java b/solr/core/src/java/org/apache/solr/schema/PreAnalyzedField.java
index 9d1779f887f..5cd8a858188 100644
--- a/solr/core/src/java/org/apache/solr/schema/PreAnalyzedField.java
+++ b/solr/core/src/java/org/apache/solr/schema/PreAnalyzedField.java
@@ -24,10 +24,12 @@ import java.io.StringReader;
import java.lang.invoke.MethodHandles;
import java.lang.reflect.Constructor;
import java.util.ArrayList;
+import java.util.Collections;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import org.apache.lucene.analysis.Analyzer;
+import org.apache.lucene.analysis.TokenStream;
import org.apache.lucene.analysis.Tokenizer;
import org.apache.lucene.analysis.tokenattributes.OffsetAttribute;
import org.apache.lucene.document.Field;
@@ -41,6 +43,7 @@ import org.apache.lucene.util.AttributeFactory;
import org.apache.lucene.util.AttributeSource;
import org.apache.lucene.util.AttributeSource.State;
import org.apache.solr.analysis.SolrAnalyzer;
+import org.apache.solr.common.SolrException;
import org.apache.solr.response.TextResponseWriter;
import org.apache.solr.search.QParser;
import org.apache.solr.uninverting.UninvertingReader.Type;
@@ -122,15 +125,91 @@ public class PreAnalyzedField extends TextField implements HasImplicitIndexAnaly
}
@Override
- public IndexableField createField(SchemaField field, Object value) {
- IndexableField f = null;
+ public List<IndexableField> createFields(SchemaField field, Object value) {
+ if (value == null || value.toString().trim().length() == 0) {
+ return Collections.emptyList();
+ }
+
+ List<IndexableField> fields = new ArrayList<>();
+ PreAnalyzedTokenizer parse = new PreAnalyzedTokenizer(parser);
+
try {
- f = fromString(field, String.valueOf(value));
- } catch (Exception e) {
- log.warn("Error parsing pre-analyzed field '{}'", field.getName(), e);
+ Reader reader = new StringReader(value.toString());
+ parse.setReader(reader);
+ parse.decodeInput(reader); // consume - this may throw IOException
+ parse.reset();
+
+ org.apache.lucene.document.FieldType type = createFieldType(field);
+ if (type == null) {
+ parse.close();
+ return Collections.emptyList();
+ }
+
+ // In Lucene 10, we need to create a single field that can handle both stored and indexed
+ // content
+ // We'll use a custom Field subclass that provides the stored value and overrides
+ // tokenStream()
+ if (parse.hasTokenStream()
+ || parse.getStringValue() != null
+ || parse.getBinaryValue() != null) {
+ // Create a pre-analyzed field that can provide both stored value and token stream
+ PreAnalyzedFieldValue fieldValue =
+ new PreAnalyzedFieldValue(
+ field.getName(), parse, parse.getStringValue(), parse.getBinaryValue(), type);
+ fields.add(fieldValue);
+ }
+ } catch (IOException e) {
+ // Re-throw as RuntimeException to propagate the error
+ throw new SolrException(
+ SolrException.ErrorCode.BAD_REQUEST,
+ "Error parsing pre-analyzed field '" + field.getName() + "'",
+ e);
+ }
+
+ return fields;
+ }
+
+ /** Custom Field that can provide both stored value and token stream for pre-analyzed content */
+ private static class PreAnalyzedFieldValue extends Field {
+ private final PreAnalyzedTokenizer tokenizer;
+
+ public PreAnalyzedFieldValue(
+ String name,
+ PreAnalyzedTokenizer tokenizer,
+ String stringValue,
+ byte[] binaryValue,
+ org.apache.lucene.document.FieldType type) {
+ super(name, type);
+ this.tokenizer = tokenizer;
+
+ // Set the stored value if present
+ if (stringValue != null && type.stored()) {
+ this.fieldsData = stringValue;
+ } else if (binaryValue != null && type.stored()) {
+ this.fieldsData = binaryValue;
+ }
+ }
+
+ @Override
+ public TokenStream tokenStream(Analyzer analyzer, TokenStream reuse) {
+ if (tokenizer != null
+ && tokenizer.hasTokenStream()
+ && type.indexOptions() != IndexOptions.NONE) {
+ return tokenizer;
+ }
+ return null;
+ }
+
+ @Override
+ public TokenStream tokenStreamValue() {
+ // Return the tokenizer if it has a token stream and the field is indexed
+ if (tokenizer != null
+ && tokenizer.hasTokenStream()
+ && type.indexOptions() != IndexOptions.NONE) {
+ return tokenizer;
+ }
return null;
}
- return f;
}
@Override
@@ -178,19 +257,27 @@ public class PreAnalyzedField extends TextField implements HasImplicitIndexAnaly
newType.setTokenized(field.isTokenized());
newType.setStored(field.stored());
newType.setOmitNorms(field.omitNorms());
- IndexOptions options = IndexOptions.DOCS_AND_FREQS_AND_POSITIONS;
- if (field.omitTermFreqAndPositions()) {
- options = IndexOptions.DOCS;
- } else if (field.omitPositions()) {
- options = IndexOptions.DOCS_AND_FREQS;
- } else if (field.storeOffsetsWithPositions()) {
- options = IndexOptions.DOCS_AND_FREQS_AND_POSITIONS_AND_OFFSETS;
+
+ // Only set index options if field is indexed
+ if (field.indexed()) {
+ IndexOptions options = IndexOptions.DOCS_AND_FREQS_AND_POSITIONS;
+ if (field.omitTermFreqAndPositions()) {
+ options = IndexOptions.DOCS;
+ } else if (field.omitPositions()) {
+ options = IndexOptions.DOCS_AND_FREQS;
+ } else if (field.storeOffsetsWithPositions()) {
+ options = IndexOptions.DOCS_AND_FREQS_AND_POSITIONS_AND_OFFSETS;
+ }
+ newType.setIndexOptions(options);
+ newType.setStoreTermVectors(field.storeTermVector());
+ newType.setStoreTermVectorOffsets(field.storeTermOffsets());
+ newType.setStoreTermVectorPositions(field.storeTermPositions());
+ newType.setStoreTermVectorPayloads(field.storeTermPayloads());
+ } else {
+ // Field is not indexed, set IndexOptions to NONE
+ newType.setIndexOptions(IndexOptions.NONE);
}
- newType.setIndexOptions(options);
- newType.setStoreTermVectors(field.storeTermVector());
- newType.setStoreTermVectorOffsets(field.storeTermOffsets());
- newType.setStoreTermVectorPositions(field.storeTermPositions());
- newType.setStoreTermVectorPayloads(field.storeTermPayloads());
+
return newType;
}
@@ -224,53 +311,6 @@ public class PreAnalyzedField extends TextField implements HasImplicitIndexAnaly
public String toFormattedString(Field f) throws IOException;
}
- public IndexableField fromString(SchemaField field, String val) throws Exception {
- if (val == null || val.trim().length() == 0) {
- return null;
- }
- PreAnalyzedTokenizer parse = new PreAnalyzedTokenizer(parser);
- Reader reader = new StringReader(val);
- parse.setReader(reader);
- parse.decodeInput(reader); // consume
- parse.reset();
- org.apache.lucene.document.FieldType type = createFieldType(field);
- if (type == null) {
- parse.close();
- return null;
- }
- Field f = null;
- if (parse.getStringValue() != null) {
- if (field.stored()) {
- f = new Field(field.getName(), parse.getStringValue(), type);
- } else {
- type.setStored(false);
- }
- } else if (parse.getBinaryValue() != null) {
- if (field.isBinary()) {
- f = new Field(field.getName(), parse.getBinaryValue(), type);
- }
- } else {
- type.setStored(false);
- }
-
- if (parse.hasTokenStream()) {
- if (field.indexed()) {
- type.setTokenized(true);
- if (f != null) {
- f.setTokenStream(parse);
- } else {
- f = new Field(field.getName(), parse, type);
- }
- } else {
- if (f != null) {
- type.setIndexOptions(IndexOptions.NONE);
- type.setTokenized(false);
- }
- }
- }
- return f;
- }
-
/** Token stream that works from a list of saved states. */
private static class PreAnalyzedTokenizer extends Tokenizer {
private final List<AttributeSource.State> cachedStates = new ArrayList<>();
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 e40e1a98e06..b36daa9ca06 100644
--- a/solr/core/src/java/org/apache/solr/schema/SchemaField.java
+++ b/solr/core/src/java/org/apache/solr/schema/SchemaField.java
@@ -21,6 +21,7 @@ import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
+import org.apache.lucene.index.DocValuesSkipIndexType;
import org.apache.lucene.index.DocValuesType;
import org.apache.lucene.index.IndexOptions;
import org.apache.lucene.index.IndexableField;
@@ -565,4 +566,9 @@ public final class SchemaField extends FieldProperties implements IndexableField
public Map<String, String> getAttributes() {
return null;
}
+
+ @Override
+ public DocValuesSkipIndexType docValuesSkipIndexType() {
+ return DocValuesSkipIndexType.NONE;
+ }
}
diff --git a/solr/core/src/java/org/apache/solr/schema/TextField.java b/solr/core/src/java/org/apache/solr/schema/TextField.java
index 549b10c4cdf..fa52e10dd82 100644
--- a/solr/core/src/java/org/apache/solr/schema/TextField.java
+++ b/solr/core/src/java/org/apache/solr/schema/TextField.java
@@ -19,13 +19,21 @@ package org.apache.solr.schema;
import java.io.IOException;
import java.util.Locale;
import java.util.Map;
+import java.util.WeakHashMap;
import org.apache.lucene.analysis.Analyzer;
import org.apache.lucene.analysis.TokenStream;
+import org.apache.lucene.analysis.Tokenizer;
+import org.apache.lucene.analysis.TokenizerFactory;
+import org.apache.lucene.analysis.custom.CustomAnalyzer;
+import org.apache.lucene.analysis.path.PathHierarchyTokenizer;
+import org.apache.lucene.analysis.path.ReversePathHierarchyTokenizer;
import org.apache.lucene.analysis.tokenattributes.TermToBytesRefAttribute;
import org.apache.lucene.index.IndexableField;
import org.apache.lucene.index.Term;
import org.apache.lucene.queries.function.ValueSource;
import org.apache.lucene.queries.function.valuesource.SortedSetFieldSource;
+import org.apache.lucene.search.BooleanClause;
+import org.apache.lucene.search.BooleanQuery;
import org.apache.lucene.search.Query;
import org.apache.lucene.search.SortField;
import org.apache.lucene.search.SortedSetSelector;
@@ -33,6 +41,7 @@ import org.apache.lucene.search.TermQuery;
import org.apache.lucene.util.BytesRef;
import org.apache.lucene.util.BytesRefBuilder;
import org.apache.lucene.util.QueryBuilder;
+import org.apache.solr.analysis.TokenizerChain;
import org.apache.solr.common.SolrException;
import org.apache.solr.parser.SolrQueryParserBase;
import org.apache.solr.query.SolrRangeQuery;
@@ -48,6 +57,9 @@ public class TextField extends FieldType {
protected boolean autoGeneratePhraseQueries;
protected boolean enableGraphQueries;
protected SolrQueryParserBase.SynonymQueryStyle synonymQueryStyle;
+
+ // Cache for PathHierarchyTokenizer detection to avoid repeated analysis
+ private static final Map<Analyzer, Boolean> pathHierarchyCache = new WeakHashMap<>();
/**
* Analyzer set by schema for text types to use when searching fields of this type, subclasses can
@@ -225,9 +237,129 @@ public class TextField extends FieldType {
}
}
+ /**
+ * Checks if the analyzer uses PathHierarchyTokenizer or ReversePathHierarchyTokenizer.
+ * This is needed because these tokenizers changed behavior in Lucene 10.
+ *
+ * <p>Uses caching and factory inspection where possible to avoid expensive reflection.
+ * For TokenizerChain and CustomAnalyzer, we can directly check the TokenizerFactory.
+ * Only falls back to instance checking for uncommon analyzer types.
+ *
+ * @param analyzer The analyzer to check
+ * @param field The field name (used for fallback TokenStream creation)
+ * @param queryText Sample text to test with (used for fallback TokenStream creation)
+ * @return true if PathHierarchyTokenizer is detected
+ */
+ private static boolean isPathHierarchyAnalyzer(Analyzer analyzer, String field, String queryText) {
+ if (analyzer == null) {
+ return false;
+ }
+
+ // Use cache to avoid repeated detection for the same analyzer
+ return pathHierarchyCache.computeIfAbsent(analyzer,
+ a -> detectPathHierarchy(a, field, queryText));
+ }
+
+ /**
+ * Performs the actual PathHierarchyTokenizer detection logic.
+ * This method is called only when the result is not cached.
+ */
+ private static boolean detectPathHierarchy(Analyzer analyzer, String field, String queryText) {
+ // Most Solr analyzers are TokenizerChain - check factory directly
+ if (analyzer instanceof TokenizerChain) {
+ TokenizerChain chain = (TokenizerChain) analyzer;
+ TokenizerFactory factory = chain.getTokenizerFactory();
+ String factoryClass = factory.getClass().getName();
+ return factoryClass.contains("PathHierarchyTokenizerFactory") ||
+ factoryClass.contains("ReversePathHierarchyTokenizerFactory");
+ }
+
+ // CustomAnalyzer is also common in Solr
+ if (analyzer instanceof CustomAnalyzer) {
+ CustomAnalyzer custom = (CustomAnalyzer) analyzer;
+ TokenizerFactory factory = custom.getTokenizerFactory();
+ String factoryClass = factory.getClass().getName();
+ return factoryClass.contains("PathHierarchyTokenizerFactory") ||
+ factoryClass.contains("ReversePathHierarchyTokenizerFactory");
+ }
+
+ // Fallback for other analyzer types: check actual tokenizer instance
+ // Only needed for edge cases where analyzer isn't TokenizerChain/CustomAnalyzer
+ if (queryText == null || queryText.isEmpty()) {
+ // Can't create TokenStream without query text, assume not path hierarchy
+ return false;
+ }
+
+ try (TokenStream stream = analyzer.tokenStream(field, queryText)) {
+ return stream instanceof PathHierarchyTokenizer ||
+ stream instanceof ReversePathHierarchyTokenizer;
+ } catch (IOException e) {
+ // Can't create stream, assume not path hierarchy
+ return false;
+ }
+ }
+
+ /**
+ * Creates a BooleanQuery with SHOULD clauses for PathHierarchyTokenizer output. This preserves
+ * the original Lucene 9 behavior where all tokens were at position 0 and could match as synonyms.
+ *
+ * @param analyzer The analyzer (must be PathHierarchyTokenizer-based)
+ * @param field The field name
+ * @param queryText The query text
+ * @return BooleanQuery with OR clauses for each path component
+ */
+ private static Query createPathHierarchyQuery(Analyzer analyzer, String field, String queryText) {
+ try (TokenStream stream = analyzer.tokenStream(field, queryText)) {
+ TermToBytesRefAttribute termAtt = stream.getAttribute(TermToBytesRefAttribute.class);
+
+ BooleanQuery.Builder bq = new BooleanQuery.Builder();
+ stream.reset();
+
+ while (stream.incrementToken()) {
+ Term term = new Term(field, termAtt.getBytesRef());
+ bq.add(new TermQuery(term), BooleanClause.Occur.SHOULD);
+ }
+
+ stream.end();
+ return bq.build();
+
+ } catch (IOException e) {
+ // Fall back to default behavior if something goes wrong
+ return new QueryBuilder(analyzer).createPhraseQuery(field, queryText);
+ }
+ }
+
+ /**
+ * Parses a field query using the provided analyzer, with special handling for
+ * PathHierarchyTokenizer.
+ *
+ * <p><strong>Lucene 10 Compatibility Fix:</strong> PathHierarchyTokenizer behavior changed in
+ * Lucene 10. Previously all tokens were emitted at position 0 (synonym-like), but now they have
+ * incrementing positions which breaks phrase query matching for hierarchical paths.
+ *
+ * <p><strong>Example of the behavior change:</strong><br>
+ * Input: "/a/b/c"<br>
+ * Lucene 9: "/a" (pos=0), "/a/b" (pos=0), "/a/b/c" (pos=0) → phrase query works<br>
+ * Lucene 10: "/a" (pos=0), "/a/b" (pos=1), "/a/b/c" (pos=2) → phrase query fails
+ *
+ * <p><strong>Solution:</strong> For PathHierarchyTokenizer, we create a BooleanQuery with SHOULD
+ * clauses to preserve the original behavior where any ancestor path matches.
+ *
+ * <p><em>Note:</em> This method has historically worked this way because it has no knowledge of
+ * quotes in the original query text.
+ *
+ * @param parser The query parser (currently unused)
+ * @param analyzer The analyzer to use for tokenization
+ * @param field The field name
+ * @param queryText The query text to analyze
+ * @return A Query object (BooleanQuery for path hierarchy, PhraseQuery for others)
+ */
static Query parseFieldQuery(QParser parser, Analyzer analyzer, String field, String queryText) {
- // note, this method always worked this way (but nothing calls it?) because it has no idea of
- // quotes...
+ if (isPathHierarchyAnalyzer(analyzer, field, queryText)) {
+ return createPathHierarchyQuery(analyzer, field, queryText);
+ }
+
+ // Default behavior for all other analyzers
return new QueryBuilder(analyzer).createPhraseQuery(field, queryText);
}
diff --git a/solr/core/src/java/org/apache/solr/search/AbstractReRankQuery.java b/solr/core/src/java/org/apache/solr/search/AbstractReRankQuery.java
index 62c4bd98bbc..a786e849108 100644
--- a/solr/core/src/java/org/apache/solr/search/AbstractReRankQuery.java
+++ b/solr/core/src/java/org/apache/solr/search/AbstractReRankQuery.java
@@ -19,7 +19,6 @@ package org.apache.solr.search;
import java.io.IOException;
import java.util.Map;
import java.util.Set;
-import org.apache.lucene.index.IndexReader;
import org.apache.lucene.search.IndexSearcher;
import org.apache.lucene.search.Query;
import org.apache.lucene.search.QueryVisitor;
@@ -97,12 +96,12 @@ public abstract class AbstractReRankQuery extends RankQuery {
}
@Override
- public Query rewrite(IndexReader reader) throws IOException {
- Query q = mainQuery.rewrite(reader);
+ public Query rewrite(IndexSearcher searcher) throws IOException {
+ Query q = mainQuery.rewrite(searcher);
if (!q.equals(mainQuery)) {
return rewrite(q);
}
- return super.rewrite(reader);
+ return super.rewrite(searcher);
}
protected abstract Query rewrite(Query rewrittenMainQuery) throws IOException;
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 97d7a0d667e..4dcdbcc6544 100644
--- a/solr/core/src/java/org/apache/solr/search/CollapsingQParserPlugin.java
+++ b/solr/core/src/java/org/apache/solr/search/CollapsingQParserPlugin.java
@@ -521,11 +521,12 @@ public class CollapsingQParserPlugin extends QParserPlugin {
new FieldInfo(
fieldInfo.name,
fieldInfo.number,
- fieldInfo.hasVectors(),
+ fieldInfo.hasTermVectors(),
fieldInfo.hasNorms(),
fieldInfo.hasPayloads(),
fieldInfo.getIndexOptions(),
DocValuesType.NONE,
+ fieldInfo.docValuesSkipIndexType(),
fieldInfo.getDocValuesGen(),
fieldInfo.attributes(),
fieldInfo.getPointDimensionCount(),
@@ -581,7 +582,6 @@ public class CollapsingQParserPlugin extends QParserPlugin {
return score;
}
- @Override
public int docID() {
return docId;
}
diff --git a/solr/core/src/java/org/apache/solr/search/ComplexPhraseQParserPlugin.java b/solr/core/src/java/org/apache/solr/search/ComplexPhraseQParserPlugin.java
index 933fc7e2205..8e0c6714d4a 100644
--- a/solr/core/src/java/org/apache/solr/search/ComplexPhraseQParserPlugin.java
+++ b/solr/core/src/java/org/apache/solr/search/ComplexPhraseQParserPlugin.java
@@ -20,6 +20,7 @@ import org.apache.lucene.queryparser.classic.ParseException;
import org.apache.lucene.queryparser.complexPhrase.ComplexPhraseQueryParser;
import org.apache.lucene.search.MultiTermQuery;
import org.apache.lucene.search.Query;
+import org.apache.lucene.util.automaton.Operations;
import org.apache.solr.common.params.CommonParams;
import org.apache.solr.common.params.SolrParams;
import org.apache.solr.common.util.NamedList;
@@ -128,8 +129,7 @@ public class ComplexPhraseQParserPlugin extends QParserPlugin {
try {
org.apache.lucene.search.Query wildcardQuery =
reverseAwareParser.getWildcardQuery(t.field(), t.text());
- setRewriteMethod(wildcardQuery);
- return wildcardQuery;
+ return setRewriteMethod(wildcardQuery, t);
} catch (SyntaxError e) {
throw new RuntimeException(e);
}
@@ -143,11 +143,38 @@ public class ComplexPhraseQParserPlugin extends QParserPlugin {
return query;
}
- private Query setRewriteMethod(org.apache.lucene.search.Query query) {
+ private Query setRewriteMethod(
+ org.apache.lucene.search.Query query, org.apache.lucene.index.Term term) {
if (query instanceof MultiTermQuery) {
- ((MultiTermQuery) query)
- .setRewriteMethod(
- org.apache.lucene.search.MultiTermQuery.SCORING_BOOLEAN_REWRITE);
+ switch (query) {
+ case org.apache.lucene.search.WildcardQuery wq -> {
+ return new org.apache.lucene.search.WildcardQuery(
+ wq.getTerm(),
+ Operations.DEFAULT_DETERMINIZE_WORK_LIMIT,
+ MultiTermQuery.SCORING_BOOLEAN_REWRITE);
+ }
+ case org.apache.lucene.search.PrefixQuery pq -> {
+ return new org.apache.lucene.search.PrefixQuery(
+ pq.getPrefix(), MultiTermQuery.SCORING_BOOLEAN_REWRITE);
+ }
+ case org.apache.lucene.search.AutomatonQuery aq -> {
+ // AutomatonQuery doesn't have getTerm(), but we need a term for the constructor
+ // Use the term passed in if available, otherwise create a dummy term with the
+ // field
+ org.apache.lucene.index.Term aqTerm =
+ term != null ? term : new org.apache.lucene.index.Term(aq.getField(), "");
+ return new org.apache.lucene.search.AutomatonQuery(
+ aqTerm,
+ aq.getAutomaton(),
+ aq.isAutomatonBinary(),
+ MultiTermQuery.SCORING_BOOLEAN_REWRITE);
+ }
+ default -> {
+ // For other MultiTermQuery types, return as-is since we can't easily recreate
+ // them
+ return query;
+ }
+ }
}
return query;
}
diff --git a/solr/core/src/java/org/apache/solr/search/DocSetCollector.java b/solr/core/src/java/org/apache/solr/search/DocSetCollector.java
index cd766f0310e..e206262176c 100644
--- a/solr/core/src/java/org/apache/solr/search/DocSetCollector.java
+++ b/solr/core/src/java/org/apache/solr/search/DocSetCollector.java
@@ -108,6 +108,7 @@ public class DocSetCollector extends SimpleCollector {
private int size = 0;
private final int smallSetSize;
private ArrayList<int[]> arrays;
+ private ArrayList<Integer> arraySizes; // Track actual used size of each array
public ExpandingIntArray(int smallSetSize) {
this.smallSetSize = smallSetSize;
@@ -115,8 +116,21 @@ public class DocSetCollector extends SimpleCollector {
}
private void addNewArray() {
+ // Mark the previous array as complete with its actual used size
+ if (arrays != null && arrays.size() > 0) {
+ if (arraySizes == null) {
+ arraySizes = new ArrayList<>();
+ }
+ arraySizes.add(indexForNextAddInCurrentAddArray);
+ }
+
int arrSize = Math.max(10, currentAddArray.length << 1);
- arrSize = Math.min(arrSize, smallSetSize - size); // max out at the smallSetSize
+ arrSize =
+ Math.max(
+ 1,
+ Math.min(
+ arrSize,
+ smallSetSize - size)); // Ensure at least 1 element // max out at the smallSetSize
this.currentAddArray = new int[arrSize];
if (arrays == null) {
arrays = new ArrayList<>();
@@ -141,8 +155,15 @@ public class DocSetCollector extends SimpleCollector {
int resultPos = 0;
for (int i = 0; i < arrays.size(); i++) {
int[] srcArray = arrays.get(i);
- int intsToCopy =
- (i < (arrays.size() - 1)) ? srcArray.length : indexForNextAddInCurrentAddArray;
+ int intsToCopy;
+ if (i < (arrays.size() - 1)) {
+ // Use tracked size for completed arrays
+ intsToCopy =
+ (arraySizes != null && i < arraySizes.size()) ? arraySizes.get(i) : srcArray.length;
+ } else {
+ // For the last array, use current position
+ intsToCopy = indexForNextAddInCurrentAddArray;
+ }
for (int j = 0; j < intsToCopy; j++) {
bits.set(srcArray[j]);
}
@@ -158,8 +179,15 @@ public class DocSetCollector extends SimpleCollector {
int resultPos = 0;
for (int i = 0; i < arrays.size(); i++) {
int[] srcArray = arrays.get(i);
- int intsToCopy =
- (i < (arrays.size() - 1)) ? srcArray.length : indexForNextAddInCurrentAddArray;
+ int intsToCopy;
+ if (i < (arrays.size() - 1)) {
+ // Use tracked size for completed arrays
+ intsToCopy =
+ (arraySizes != null && i < arraySizes.size()) ? arraySizes.get(i) : srcArray.length;
+ } else {
+ // For the last array, use current position
+ intsToCopy = indexForNextAddInCurrentAddArray;
+ }
System.arraycopy(srcArray, 0, result, resultPos, intsToCopy);
resultPos += intsToCopy;
}
diff --git a/solr/core/src/java/org/apache/solr/search/DocSetQuery.java b/solr/core/src/java/org/apache/solr/search/DocSetQuery.java
index d4122b211f0..9474f12bf9a 100644
--- a/solr/core/src/java/org/apache/solr/search/DocSetQuery.java
+++ b/solr/core/src/java/org/apache/solr/search/DocSetQuery.java
@@ -27,6 +27,7 @@ import org.apache.lucene.search.Query;
import org.apache.lucene.search.QueryVisitor;
import org.apache.lucene.search.ScoreMode;
import org.apache.lucene.search.Scorer;
+import org.apache.lucene.search.ScorerSupplier;
import org.apache.lucene.search.Weight;
/**
@@ -80,12 +81,23 @@ class DocSetQuery extends Query implements DocSetProducer {
throws IOException {
return new ConstantScoreWeight(this, boost) {
@Override
- public Scorer scorer(LeafReaderContext context) {
+ public ScorerSupplier scorerSupplier(LeafReaderContext context) {
DocIdSetIterator disi = docSet.iterator(context);
if (disi == null) {
return null;
}
- return new ConstantScoreScorer(this, score(), scoreMode, disi);
+ final float score = score();
+ return new ScorerSupplier() {
+ @Override
+ public Scorer get(long leadCost) {
+ return new ConstantScoreScorer(score, scoreMode, disi);
+ }
+
+ @Override
+ public long cost() {
+ return disi.cost();
+ }
+ };
}
@Override
diff --git a/solr/core/src/java/org/apache/solr/search/DocSetUtil.java b/solr/core/src/java/org/apache/solr/search/DocSetUtil.java
index eca19c8c0a7..595959fd137 100644
--- a/solr/core/src/java/org/apache/solr/search/DocSetUtil.java
+++ b/solr/core/src/java/org/apache/solr/search/DocSetUtil.java
@@ -17,6 +17,7 @@
package org.apache.solr.search;
import java.io.IOException;
+import java.util.Collection;
import java.util.Iterator;
import java.util.List;
import org.apache.lucene.index.DirectoryReader;
@@ -28,6 +29,7 @@ import org.apache.lucene.index.Term;
import org.apache.lucene.index.Terms;
import org.apache.lucene.index.TermsEnum;
import org.apache.lucene.search.Collector;
+import org.apache.lucene.search.CollectorManager;
import org.apache.lucene.search.DocIdSetIterator;
import org.apache.lucene.search.LeafCollector;
import org.apache.lucene.search.MatchAllDocsQuery;
@@ -146,14 +148,32 @@ public class DocSetUtil {
throws IOException {
int maxDoc = searcher.getIndexReader().maxDoc();
- DocSetCollector collector = new DocSetCollector(maxDoc);
// This may throw an ExitableDirectoryReader.ExitingReaderException
// but we should not catch it here, as we don't know how this DocSet will be used (it could be
// negated before use) or cached.
- searcher.search(query, collector);
- return getDocSet(collector, searcher);
+ // Check if IndexSearcher has an executor
+ boolean hasExecutor = searcher.getTaskExecutor() != null;
+
+ if (hasExecutor) {
+ // With executor, use a proper CollectorManager that creates new collectors
+ final int smallSetSize = smallSetSize(maxDoc);
+ DocSetCollectorManager manager = new DocSetCollectorManager(maxDoc, smallSetSize);
+ FixedBitSet bitSet = searcher.search(query, manager);
+ if (bitSet != null) {
+ BitDocSet result = new BitDocSet(bitSet, bitSet.cardinality());
+ // Apply the same deduplication logic as the non-executor path
+ return getDocSet(result, searcher);
+ } else {
+ return DocSet.empty();
+ }
+ } else {
+ // Without executor, use the simple collector approach
+ DocSetCollector collector = new DocSetCollector(maxDoc);
+ searcher.search(query, collector);
+ return getDocSet(collector, searcher);
+ }
}
public static DocSet createDocSet(SolrIndexSearcher searcher, Term term) throws IOException {
@@ -335,4 +355,52 @@ public class DocSetUtil {
dest.set(adjustedSegDocBase + segOrd, adjustedSegDocBase + limit);
} while (segOrd > srcOffset);
}
+
+ /** CollectorManager for creating DocSetCollectors in parallel execution */
+ private static class DocSetCollectorManager
+ implements CollectorManager<DocSetCollector, FixedBitSet> {
+ private final int maxDoc;
+ private final int smallSetSize;
+
+ public DocSetCollectorManager(int maxDoc, int smallSetSize) {
+ this.maxDoc = maxDoc;
+ this.smallSetSize = smallSetSize;
+ }
+
+ @Override
+ public DocSetCollector newCollector() throws IOException {
+ return new DocSetCollector(smallSetSize, maxDoc);
+ }
+
+ @Override
+ public FixedBitSet reduce(Collection<DocSetCollector> collectors) throws IOException {
+ // Combine results from all collectors
+ FixedBitSet result = null;
+ int totalSize = 0;
+
+ for (DocSetCollector collector : collectors) {
+ totalSize += collector.size();
+ DocSet docSet = collector.getDocSet();
+
+ if (docSet instanceof BitDocSet) {
+ BitDocSet bitDocSet = (BitDocSet) docSet;
+ if (result == null) {
+ result = bitDocSet.getBits().clone();
+ } else {
+ result.or(bitDocSet.getBits());
+ }
+ } else if (docSet instanceof SortedIntDocSet) {
+ if (result == null) {
+ result = new FixedBitSet(maxDoc);
+ }
+ SortedIntDocSet sortedSet = (SortedIntDocSet) docSet;
+ for (DocIterator iter = sortedSet.iterator(); iter.hasNext(); ) {
+ result.set(iter.nextDoc());
+ }
+ }
+ }
+
+ return result;
+ }
+ }
}
diff --git a/solr/core/src/java/org/apache/solr/search/EarlyTerminatingCollector.java b/solr/core/src/java/org/apache/solr/search/EarlyTerminatingCollector.java
index 43b0f8e6fdc..27000da4cbb 100644
--- a/solr/core/src/java/org/apache/solr/search/EarlyTerminatingCollector.java
+++ b/solr/core/src/java/org/apache/solr/search/EarlyTerminatingCollector.java
@@ -58,7 +58,7 @@ public class EarlyTerminatingCollector extends FilterCollector {
assert null != delegate;
this.maxDocsToCollect = maxDocsToCollect;
this.pendingDocsToCollect = docsToCollect;
- this.chunkSize = Math.min(100, maxDocsToCollect / 10);
+ this.chunkSize = Math.max(1, Math.min(100, maxDocsToCollect / 10));
}
@Override
diff --git a/solr/core/src/java/org/apache/solr/search/EarlyTerminatingSortingCollector.java b/solr/core/src/java/org/apache/solr/search/EarlyTerminatingSortingCollector.java
index fe35719a128..4153f197432 100644
--- a/solr/core/src/java/org/apache/solr/search/EarlyTerminatingSortingCollector.java
+++ b/solr/core/src/java/org/apache/solr/search/EarlyTerminatingSortingCollector.java
@@ -96,7 +96,7 @@ final class EarlyTerminatingSortingCollector extends FilterCollector {
@Override
public LeafCollector getLeafCollector(LeafReaderContext context) throws IOException {
- Sort segmentSort = context.reader().getMetaData().getSort();
+ Sort segmentSort = context.reader().getMetaData().sort();
if (segmentSort != null && canEarlyTerminate(sort, segmentSort) == false) {
throw new IllegalStateException(
"Cannot early terminate with sort order "
diff --git a/solr/core/src/java/org/apache/solr/search/ExportQParserPlugin.java b/solr/core/src/java/org/apache/solr/search/ExportQParserPlugin.java
index 8529533dfb3..be24eee9249 100644
--- a/solr/core/src/java/org/apache/solr/search/ExportQParserPlugin.java
+++ b/solr/core/src/java/org/apache/solr/search/ExportQParserPlugin.java
@@ -19,7 +19,6 @@ package org.apache.solr.search;
import java.io.IOException;
import java.util.Map;
import java.util.Objects;
-import org.apache.lucene.index.IndexReader;
import org.apache.lucene.index.LeafReaderContext;
import org.apache.lucene.search.IndexSearcher;
import org.apache.lucene.search.LeafCollector;
@@ -94,10 +93,10 @@ public class ExportQParserPlugin extends QParserPlugin {
}
@Override
- public Query rewrite(IndexReader reader) throws IOException {
- Query q = mainQuery.rewrite(reader);
+ public Query rewrite(IndexSearcher searcher) throws IOException {
+ Query q = mainQuery.rewrite(searcher);
if (q.equals(mainQuery)) {
- return super.rewrite(reader);
+ return super.rewrite(searcher);
} else {
return clone().wrap(q);
}
diff --git a/solr/core/src/java/org/apache/solr/search/ExtendedDismaxQParser.java b/solr/core/src/java/org/apache/solr/search/ExtendedDismaxQParser.java
index 5264cc61257..75218f3cce9 100644
--- a/solr/core/src/java/org/apache/solr/search/ExtendedDismaxQParser.java
+++ b/solr/core/src/java/org/apache/solr/search/ExtendedDismaxQParser.java
@@ -192,7 +192,7 @@ public class ExtendedDismaxQParser extends QParser {
// a MatchAllDocsQuery. Using MatchAllDocsQuery by itself enables later optimizations
BooleanQuery topQueryBoolean = (BooleanQuery) topQuery;
if (topQueryBoolean.clauses().size() == 1) {
- Query onlyQuery = topQueryBoolean.clauses().get(0).getQuery();
+ Query onlyQuery = topQueryBoolean.clauses().get(0).query();
if (onlyQuery instanceof MatchAllDocsQuery) {
topQuery = onlyQuery;
}
@@ -1245,10 +1245,9 @@ public class ExtendedDismaxQParser extends QParser {
if (lst.get(n) instanceof BoostQuery boostQuery) {
BooleanQuery booleanQuery = (BooleanQuery) boostQuery.getQuery();
subs.add(
- new BoostQuery(
- booleanQuery.clauses().get(c).getQuery(), boostQuery.getBoost()));
+ new BoostQuery(booleanQuery.clauses().get(c).query(), boostQuery.getBoost()));
} else {
- subs.add(((BooleanQuery) lst.get(n)).clauses().get(c).getQuery());
+ subs.add(((BooleanQuery) lst.get(n)).clauses().get(c).query());
}
}
q.add(
@@ -1308,17 +1307,16 @@ public class ExtendedDismaxQParser extends QParser {
break;
}
for (int c = 0; c < firstBooleanClauses.size(); ++c) {
- if (nthBooleanClauses.get(c).getQuery().getClass()
- != firstBooleanClauses.get(c).getQuery().getClass()
- || nthBooleanClauses.get(c).getOccur() != firstBooleanClauses.get(c).getOccur()) {
+ if (nthBooleanClauses.get(c).query().getClass()
+ != firstBooleanClauses.get(c).query().getClass()
+ || nthBooleanClauses.get(c).occur() != firstBooleanClauses.get(c).occur()) {
allSame = false;
break;
}
- if (firstBooleanClauses.get(c).getQuery() instanceof BooleanQuery
+ if (firstBooleanClauses.get(c).query() instanceof BooleanQuery
&& !allSameQueryStructure(
Arrays.asList(
- firstBooleanClauses.get(c).getQuery(),
- nthBooleanClauses.get(c).getQuery()))) {
+ firstBooleanClauses.get(c).query(), nthBooleanClauses.get(c).query()))) {
allSame = false;
break;
}
@@ -1342,8 +1340,8 @@ public class ExtendedDismaxQParser extends QParser {
if (q instanceof BooleanQuery) {
boolean allOptionalDisMaxQueries = true;
for (BooleanClause c : ((BooleanQuery) q).clauses()) {
- if (c.getOccur() != BooleanClause.Occur.SHOULD
- || !(c.getQuery() instanceof DisjunctionMaxQuery)) {
+ if (c.occur() != BooleanClause.Occur.SHOULD
+ || !(c.query() instanceof DisjunctionMaxQuery)) {
allOptionalDisMaxQueries = false;
break;
}
@@ -1353,7 +1351,7 @@ public class ExtendedDismaxQParser extends QParser {
// DisjunctionMaxQuery-s. Unwrap the query and add a clause for each contained DisMax
// query.
for (BooleanClause c : ((BooleanQuery) q).clauses()) {
- clauses.add(newBooleanClause(c.getQuery(), occur));
+ clauses.add(newBooleanClause(c.query(), occur));
}
return;
}
diff --git a/solr/core/src/java/org/apache/solr/search/FunctionRangeQuery.java b/solr/core/src/java/org/apache/solr/search/FunctionRangeQuery.java
index db71c7d6589..233eb9cbda2 100644
--- a/solr/core/src/java/org/apache/solr/search/FunctionRangeQuery.java
+++ b/solr/core/src/java/org/apache/solr/search/FunctionRangeQuery.java
@@ -85,7 +85,6 @@ public class FunctionRangeQuery extends ExtendedQueryBase implements PostFilter
FunctionValues dv = rangeFilt.getValueSource().getValues(fcontext, context);
valueSourceScorer =
dv.getRangeScorer(
- weight,
context,
rangeFilt.getLowerVal(),
rangeFilt.getUpperVal(),
diff --git a/solr/core/src/java/org/apache/solr/search/GraphTermsQParserPlugin.java b/solr/core/src/java/org/apache/solr/search/GraphTermsQParserPlugin.java
index 3baae4e4027..d691af409f3 100644
--- a/solr/core/src/java/org/apache/solr/search/GraphTermsQParserPlugin.java
+++ b/solr/core/src/java/org/apache/solr/search/GraphTermsQParserPlugin.java
@@ -51,6 +51,7 @@ import org.apache.lucene.search.Query;
import org.apache.lucene.search.QueryVisitor;
import org.apache.lucene.search.ScoreMode;
import org.apache.lucene.search.Scorer;
+import org.apache.lucene.search.ScorerSupplier;
import org.apache.lucene.search.Weight;
import org.apache.lucene.util.Accountable;
import org.apache.lucene.util.ArrayUtil;
@@ -200,7 +201,7 @@ public class GraphTermsQParserPlugin extends QParserPlugin {
public void setCost(int cost) {}
@Override
- public Query rewrite(IndexReader reader) throws IOException {
+ public Query rewrite(IndexSearcher searcher) throws IOException {
return this;
}
@@ -253,28 +254,47 @@ public class GraphTermsQParserPlugin extends QParserPlugin {
return new ConstantScoreWeight(this, boost) {
@Override
- public Scorer scorer(LeafReaderContext context) throws IOException {
+ public ScorerSupplier scorerSupplier(LeafReaderContext context) throws IOException {
final LeafReader reader = context.reader();
Terms terms = reader.terms(field);
if (terms == null) {
return null;
}
+
TermsEnum termsEnum = terms.iterator();
PostingsEnum docs = null;
DocIdSetBuilder builder = new DocIdSetBuilder(reader.maxDoc(), terms);
for (int i = 0; i < finalContexts.size(); i++) {
TermStates ts = finalContexts.get(i);
- TermState termState = ts.get(context);
- if (termState != null) {
- Term term = finalTerms.get(i);
- termsEnum.seekExact(term.bytes(), ts.get(context));
- docs = termsEnum.postings(docs, PostingsEnum.NONE);
- builder.add(docs);
+ var termStateSupplier = ts.get(context);
+ if (termStateSupplier != null) {
+ TermState termState = termStateSupplier.get();
+ if (termState != null) {
+ Term term = finalTerms.get(i);
+ termsEnum.seekExact(term.bytes(), termState);
+ docs = termsEnum.postings(docs, PostingsEnum.NONE);
+ builder.add(docs);
+ }
}
}
DocIdSet docIdSet = builder.build();
DocIdSetIterator disi = docIdSet.iterator();
- return disi == null ? null : new ConstantScoreScorer(this, score(), scoreMode, disi);
+ if (disi == null) {
+ return null;
+ }
+
+ return new ScorerSupplier() {
+ @Override
+ public Scorer get(long leadCost) throws IOException {
+ // disi is already computed and non-null
+ return new ConstantScoreScorer(score(), scoreMode, disi);
+ }
+
+ @Override
+ public long cost() {
+ return finalTerms.size();
+ }
+ };
}
@Override
@@ -593,17 +613,30 @@ abstract class PointSetQuery extends Query implements DocSetProducer, Accountabl
DocSet docs;
@Override
- public Scorer scorer(LeafReaderContext context) throws IOException {
+ public ScorerSupplier scorerSupplier(LeafReaderContext context) throws IOException {
+ // Ensure docs are computed first
if (docs == null) {
docs = getDocSet(searcher);
}
- // Although this set only includes live docs, other filters can be pushed down to queries.
+ // Check if this context has any matching documents before creating ScorerSupplier
DocIdSetIterator readerSetIterator = docs.iterator(context);
if (readerSetIterator == null) {
return null;
}
- return new ConstantScoreScorer(this, score(), scoreMode, readerSetIterator);
+
+ return new ScorerSupplier() {
+ @Override
+ public Scorer get(long leadCost) throws IOException {
+ // readerSetIterator is already computed and non-null
+ return new ConstantScoreScorer(score(), scoreMode, readerSetIterator);
+ }
+
+ @Override
+ public long cost() {
+ return docs.size();
+ }
+ };
}
@Override
diff --git a/solr/core/src/java/org/apache/solr/search/Grouping.java b/solr/core/src/java/org/apache/solr/search/Grouping.java
index ffe73bffe73..97320bacaa4 100644
--- a/solr/core/src/java/org/apache/solr/search/Grouping.java
+++ b/solr/core/src/java/org/apache/solr/search/Grouping.java
@@ -36,11 +36,11 @@ import org.apache.lucene.search.MultiCollector;
import org.apache.lucene.search.Query;
import org.apache.lucene.search.ScoreDoc;
import org.apache.lucene.search.Sort;
-import org.apache.lucene.search.TimeLimitingCollector;
import org.apache.lucene.search.TopDocs;
import org.apache.lucene.search.TopDocsCollector;
import org.apache.lucene.search.TopFieldCollector;
-import org.apache.lucene.search.TopScoreDocCollector;
+import org.apache.lucene.search.TopFieldCollectorManager;
+import org.apache.lucene.search.TopScoreDocCollectorManager;
import org.apache.lucene.search.TotalHitCountCollector;
import org.apache.lucene.search.TotalHits;
import org.apache.lucene.search.grouping.AllGroupHeadsCollector;
@@ -103,7 +103,6 @@ public class Grouping {
private int maxMatches; // max number of matches from any grouping command
private float maxScore = Float.NaN; // max score seen in any doclist
private boolean signalCacheWarning = false;
- private TimeLimitingCollector timeLimitingCollector;
// output if one of the grouping commands should be used as the main result.
public DocList mainResult;
@@ -422,31 +421,25 @@ public class Grouping {
}
/**
- * Invokes search with the specified filter and collector. If a time limit has been specified,
- * wrap the collector in a TimeLimitingCollector
+ * Invokes search with the specified filter and collector. If a time limit has been specified, set
+ * timeout on the searcher before search.
*/
private void searchWithTimeLimiter(final Query filterQuery, Collector collector)
throws IOException {
+ // Apply timeout using IndexSearcher.setTimeout if needed
if (cmd.getTimeAllowed() > 0) {
- if (timeLimitingCollector == null) {
- timeLimitingCollector =
- new TimeLimitingCollector(
- collector, TimeLimitingCollector.getGlobalCounter(), cmd.getTimeAllowed());
- } else {
- /*
- * This is so the same timer can be used for grouping's multiple phases.
- * We don't want to create a new TimeLimitingCollector for each phase because that would
- * reset the timer for each phase. If time runs out during the first phase, the
- * second phase should timeout quickly.
- */
- timeLimitingCollector.setCollector(collector);
- }
- collector = timeLimitingCollector;
+ searcher.setTimeout(SolrIndexSearcher.QueryLimitsTimeout.INSTANCE);
}
+
try {
searcher.search(QueryUtils.combineQueryAndFilter(query, filterQuery), collector);
- } catch (TimeLimitingCollector.TimeExceededException
- | ExitableDirectoryReader.ExitingReaderException x) {
+
+ // Check for timeout after search
+ if (cmd.getTimeAllowed() > 0 && searcher.timedOut()) {
+ log.warn("Query timed out: [{}]", query);
+ qr.setPartialResults(true);
+ }
+ } catch (ExitableDirectoryReader.ExitingReaderException x) {
// INFO log the (possibly quite long) query object separately
log.info("Query: {}; ", query);
// to make WARN logged exception content more visible
@@ -593,7 +586,7 @@ public class Grouping {
protected void populateScoresIfNecessary() throws IOException {
if (needScores) {
for (GroupDocs<?> groups : result.groups) {
- TopFieldCollector.populateScores(groups.scoreDocs, searcher, query);
+ TopFieldCollector.populateScores(groups.scoreDocs(), searcher, query);
}
}
}
@@ -613,8 +606,8 @@ public class Grouping {
}
protected DocList getDocList(GroupDocs<?> groups) {
- assert groups.totalHits.relation == TotalHits.Relation.EQUAL_TO;
- int max = Math.toIntExact(groups.totalHits.value);
+ assert groups.totalHits().relation() == TotalHits.Relation.EQUAL_TO;
+ int max = Math.toIntExact(groups.totalHits().value());
int off = groupOffset;
int len = docsPerGroup;
if (format == Format.simple) {
@@ -624,16 +617,16 @@ public class Grouping {
int docsToCollect = getMax(off, len, max);
// TODO: implement a DocList impl that doesn't need to start at offset=0
- int docsCollected = Math.min(docsToCollect, groups.scoreDocs.length);
+ int docsCollected = Math.min(docsToCollect, groups.scoreDocs().length);
int ids[] = new int[docsCollected];
float[] scores = needScores ? new float[docsCollected] : null;
for (int i = 0; i < ids.length; i++) {
- ids[i] = groups.scoreDocs[i].doc;
- if (scores != null) scores[i] = groups.scoreDocs[i].score;
+ ids[i] = groups.scoreDocs()[i].doc;
+ if (scores != null) scores[i] = groups.scoreDocs()[i].score;
}
- float score = groups.maxScore;
+ float score = groups.maxScore();
maxScore = maxAvoidNaN(score, maxScore);
DocSlice docs =
new DocSlice(
@@ -641,7 +634,7 @@ public class Grouping {
Math.max(0, ids.length - off),
ids,
scores,
- groups.totalHits.value,
+ groups.totalHits().value(),
score,
TotalHits.Relation.EQUAL_TO);
@@ -670,9 +663,9 @@ public class Grouping {
outer:
for (GroupDocs<T> group : groups) {
- maxScore = maxAvoidNaN(maxScore, group.maxScore);
+ maxScore = maxAvoidNaN(maxScore, group.maxScore());
- for (ScoreDoc scoreDoc : group.scoreDocs) {
+ for (ScoreDoc scoreDoc : group.scoreDocs()) {
if (docsGathered >= docsToGather) {
break outer;
}
@@ -833,20 +826,20 @@ public class Grouping {
// To keep the response format compatable with trunk.
// In trunk MutableValue can convert an indexed value to its native type. E.g. string to int
// The only option I currently see is the use the FieldType for this
- if (group.groupValue != null) {
+ if (group.groupValue() != null) {
SchemaField schemaField = searcher.getSchema().getField(groupBy);
FieldType fieldType = schemaField.getType();
// use createFields so that fields having doc values are also supported
// TODO: currently, this path is called only for string field, so
- // should we just use fieldType.toObject(schemaField, group.groupValue) here?
- List<IndexableField> fields = schemaField.createFields(group.groupValue.utf8ToString());
+ // should we just use fieldType.toObject(schemaField, group.groupValue()()) here?
+ List<IndexableField> fields = schemaField.createFields(group.groupValue().utf8ToString());
if (fields != null && !fields.isEmpty()) {
nl.add("groupValue", fieldType.toObject(fields.get(0)));
} else {
throw new SolrException(
ErrorCode.INVALID_STATE,
"Couldn't create schema field for grouping, group value: "
- + group.groupValue.utf8ToString()
+ + group.groupValue().utf8ToString()
+ ", field: "
+ schemaField);
}
@@ -895,11 +888,17 @@ public class Grouping {
Collector subCollector;
if (withinGroupSort == null || withinGroupSort.equals(Sort.RELEVANCE)) {
subCollector =
- topCollector = TopScoreDocCollector.create(groupDocsToCollect, Integer.MAX_VALUE);
+ topCollector =
+ new TopScoreDocCollectorManager(groupDocsToCollect, null, Integer.MAX_VALUE)
+ .newCollector();
} else {
topCollector =
- TopFieldCollector.create(
- searcher.weightSort(withinGroupSort), groupDocsToCollect, Integer.MAX_VALUE);
+ new TopFieldCollectorManager(
+ searcher.weightSort(withinGroupSort),
+ groupDocsToCollect,
+ null,
+ Integer.MAX_VALUE)
+ .newCollector();
if (needScores) {
maxScoreCollector = new MaxScoreCollector();
subCollector = MultiCollector.wrap(topCollector, maxScoreCollector);
@@ -1060,7 +1059,7 @@ public class Grouping {
for (GroupDocs<MutableValue> group : result.groups) {
NamedList<Object> nl = new SimpleOrderedMap<>();
groupList.add(nl); // grouped={ key={ groups=[ {
- nl.add("groupValue", group.groupValue.toObject());
+ nl.add("groupValue", group.groupValue().toObject());
addDocList(nl, group);
}
}
diff --git a/solr/core/src/java/org/apache/solr/search/JoinQuery.java b/solr/core/src/java/org/apache/solr/search/JoinQuery.java
index ede3edaddc7..093a26397d8 100644
--- a/solr/core/src/java/org/apache/solr/search/JoinQuery.java
+++ b/solr/core/src/java/org/apache/solr/search/JoinQuery.java
@@ -22,7 +22,6 @@ import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Objects;
-import org.apache.lucene.index.IndexReader;
import org.apache.lucene.index.LeafReader;
import org.apache.lucene.index.LeafReaderContext;
import org.apache.lucene.index.MultiPostingsEnum;
@@ -38,6 +37,7 @@ import org.apache.lucene.search.Query;
import org.apache.lucene.search.QueryVisitor;
import org.apache.lucene.search.ScoreMode;
import org.apache.lucene.search.Scorer;
+import org.apache.lucene.search.ScorerSupplier;
import org.apache.lucene.search.Weight;
import org.apache.lucene.util.Bits;
import org.apache.lucene.util.BytesRef;
@@ -81,9 +81,9 @@ class JoinQuery extends Query implements SolrSearcherRequirer {
}
@Override
- public Query rewrite(IndexReader reader) throws IOException {
+ public Query rewrite(IndexSearcher searcher) throws IOException {
// don't rewrite the subQuery
- return super.rewrite(reader);
+ return super.rewrite(searcher);
}
@Override
@@ -158,7 +158,8 @@ class JoinQuery extends Query implements SolrSearcherRequirer {
DocSet resultSet;
@Override
- public Scorer scorer(LeafReaderContext context) throws IOException {
+ public ScorerSupplier scorerSupplier(LeafReaderContext context) throws IOException {
+ // Ensure resultSet is computed first
if (resultSet == null) {
boolean debug = rb != null && rb.isDebug();
RTimer timer = (debug ? new RTimer() : null);
@@ -187,12 +188,23 @@ class JoinQuery extends Query implements SolrSearcherRequirer {
}
}
- // Although this set only includes live docs, other filters can be pushed down to queries.
+ // Check if this context has any matching documents before creating ScorerSupplier
DocIdSetIterator readerSetIterator = resultSet.iterator(context);
if (readerSetIterator == null) {
return null;
}
- return new ConstantScoreScorer(this, score(), scoreMode, readerSetIterator);
+
+ return new ScorerSupplier() {
+ @Override
+ public Scorer get(long leadCost) throws IOException {
+ return new ConstantScoreScorer(score(), scoreMode, readerSetIterator);
+ }
+
+ @Override
+ public long cost() {
+ return resultSet.size();
+ }
+ };
}
@Override
@@ -334,7 +346,7 @@ class JoinQuery extends Query implements SolrSearcherRequirer {
for (int subindex = 0; subindex < numSubs; subindex++) {
MultiPostingsEnum.EnumWithSlice sub = subs[subindex];
if (sub.postingsEnum == null) continue;
- int base = sub.slice.start;
+ int base = sub.slice.start();
int docid;
while ((docid = sub.postingsEnum.nextDoc()) != DocIdSetIterator.NO_MORE_DOCS) {
if (fastForRandomSet.get(docid + base)) {
@@ -411,7 +423,7 @@ class JoinQuery extends Query implements SolrSearcherRequirer {
for (int subindex = 0; subindex < numSubs; subindex++) {
MultiPostingsEnum.EnumWithSlice sub = subs[subindex];
if (sub.postingsEnum == null) continue;
- int base = sub.slice.start;
+ int base = sub.slice.start();
int docid;
while ((docid = sub.postingsEnum.nextDoc()) != DocIdSetIterator.NO_MORE_DOCS) {
resultListDocs++;
diff --git a/solr/core/src/java/org/apache/solr/search/MatchCostQuery.java b/solr/core/src/java/org/apache/solr/search/MatchCostQuery.java
index d1a4656a88c..1e4be22d206 100644
--- a/solr/core/src/java/org/apache/solr/search/MatchCostQuery.java
+++ b/solr/core/src/java/org/apache/solr/search/MatchCostQuery.java
@@ -19,9 +19,7 @@ package org.apache.solr.search;
import java.io.IOException;
import java.util.Objects;
-import org.apache.lucene.index.IndexReader;
import org.apache.lucene.index.LeafReaderContext;
-import org.apache.lucene.search.BulkScorer;
import org.apache.lucene.search.DocIdSetIterator;
import org.apache.lucene.search.Explanation;
import org.apache.lucene.search.IndexSearcher;
@@ -30,6 +28,7 @@ import org.apache.lucene.search.Query;
import org.apache.lucene.search.QueryVisitor;
import org.apache.lucene.search.ScoreMode;
import org.apache.lucene.search.Scorer;
+import org.apache.lucene.search.ScorerSupplier;
import org.apache.lucene.search.TwoPhaseIterator;
import org.apache.lucene.search.Weight;
@@ -66,8 +65,8 @@ public class MatchCostQuery extends Query {
}
@Override
- public Query rewrite(IndexReader reader) throws IOException {
- final Query rewrite = delegate.rewrite(reader);
+ public Query rewrite(IndexSearcher searcher) throws IOException {
+ final Query rewrite = delegate.rewrite(searcher);
if (delegate.equals(rewrite)) {
return this; // unchanged
}
@@ -95,63 +94,68 @@ public class MatchCostQuery extends Query {
return weight.explain(context, doc);
}
- // do not delegate scorerSupplier(); use the default implementation that calls our
- // scorer() so that we can wrap TPI
-
@Override
- public Scorer scorer(LeafReaderContext context) throws IOException {
- final Scorer scorer = weight.scorer(context);
- if (scorer == null) {
+ public ScorerSupplier scorerSupplier(LeafReaderContext context) throws IOException {
+ final ScorerSupplier supplier = weight.scorerSupplier(context);
+ if (supplier == null) {
return null;
}
- final TwoPhaseIterator tpi = scorer.twoPhaseIterator();
- if (tpi == null || tpi.matchCost() == matchCost) {
- return scorer; // needn't wrap/delegate
- }
- return new Scorer(weight) { // pass delegated weight
-
+ return new ScorerSupplier() {
@Override
- public TwoPhaseIterator twoPhaseIterator() {
- return new TwoPhaseIterator(tpi.approximation()) {
+ public Scorer get(long leadCost) throws IOException {
+ final Scorer scorer = supplier.get(leadCost);
+ if (scorer == null) {
+ return null;
+ }
+ final TwoPhaseIterator tpi = scorer.twoPhaseIterator();
+ if (tpi == null || tpi.matchCost() == matchCost) {
+ return scorer; // needn't wrap/delegate
+ }
+ return new Scorer() {
+
@Override
- public boolean matches() throws IOException {
- return tpi.matches();
+ public TwoPhaseIterator twoPhaseIterator() {
+ return new TwoPhaseIterator(tpi.approximation()) {
+ @Override
+ public boolean matches() throws IOException {
+ return tpi.matches();
+ }
+
+ @Override
+ public float matchCost() {
+ return matchCost;
+ }
+ };
}
@Override
- public float matchCost() {
- return matchCost;
+ public DocIdSetIterator iterator() {
+ return scorer.iterator();
}
- };
- }
- @Override
- public DocIdSetIterator iterator() {
- return scorer.iterator();
- }
+ @Override
+ public float getMaxScore(int upTo) throws IOException {
+ return scorer.getMaxScore(upTo);
+ }
- @Override
- public float getMaxScore(int upTo) throws IOException {
- return scorer.getMaxScore(upTo);
- }
+ @Override
+ public float score() throws IOException {
+ return scorer.score();
+ }
- @Override
- public float score() throws IOException {
- return scorer.score();
+ @Override
+ public int docID() {
+ return scorer.docID();
+ }
+ };
}
@Override
- public int docID() {
- return scorer.docID();
+ public long cost() {
+ return supplier.cost();
}
};
}
-
- // delegate because thus there's no need to care about TPI matchCost if called
- @Override
- public BulkScorer bulkScorer(LeafReaderContext context) throws IOException {
- return weight.bulkScorer(context);
- }
};
}
}
diff --git a/solr/core/src/java/org/apache/solr/search/MultiThreadedSearcher.java b/solr/core/src/java/org/apache/solr/search/MultiThreadedSearcher.java
index f129b9419fb..71e39818c41 100644
--- a/solr/core/src/java/org/apache/solr/search/MultiThreadedSearcher.java
+++ b/solr/core/src/java/org/apache/solr/search/MultiThreadedSearcher.java
@@ -55,6 +55,7 @@ public class MultiThreadedSearcher {
boolean needDocSet,
QueryResult queryResult)
throws IOException {
+
Collection<CollectorManager<Collector, Object>> collectors = new ArrayList<>();
int firstCollectorsSize = 0;
@@ -356,7 +357,7 @@ public class MultiThreadedSearcher {
} else {
mergedTopDocs = TopDocs.merge(0, len, topDocs);
}
- totalHits = (int) mergedTopDocs.totalHits.value;
+ totalHits = (int) mergedTopDocs.totalHits.value();
}
return new TopDocsResult(mergedTopDocs, totalHits);
}
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 25c3a62debd..53ea2e4a56b 100644
--- a/solr/core/src/java/org/apache/solr/search/NumericHidingLeafReader.java
+++ b/solr/core/src/java/org/apache/solr/search/NumericHidingLeafReader.java
@@ -63,13 +63,14 @@ public class NumericHidingLeafReader extends FilterLeafReader {
new FieldInfo(
fi.name,
fi.number,
- fi.hasVectors(),
+ fi.hasTermVectors(),
fi.omitsNorms(),
fi.hasPayloads(),
fi.getIndexOptions(),
DocValuesType.NONE,
- -1,
- Collections.emptyMap(),
+ fi.docValuesSkipIndexType(),
+ fi.getDocValuesGen(),
+ fi.attributes(),
fi.getPointDimensionCount(),
fi.getPointIndexDimensionCount(),
fi.getPointNumBytes(),
diff --git a/solr/core/src/java/org/apache/solr/search/QParser.java b/solr/core/src/java/org/apache/solr/search/QParser.java
index 4d207b19144..0fd1a081098 100644
--- a/solr/core/src/java/org/apache/solr/search/QParser.java
+++ b/solr/core/src/java/org/apache/solr/search/QParser.java
@@ -340,8 +340,8 @@ public abstract class QParser {
return switch (q) {
case null -> new LongConstValueSource(0);
case FunctionQuery functionQuery -> functionQuery.getValueSource();
- case FunctionScoreQuery functionQuery -> ValueSource.fromDoubleValuesSource(
- functionQuery.getSource());
+ case FunctionScoreQuery functionQuery ->
+ ValueSource.fromDoubleValuesSource(functionQuery.getSource());
default -> new QueryValueSource(q, 0.0f);
};
}
diff --git a/solr/core/src/java/org/apache/solr/search/QueryParsing.java b/solr/core/src/java/org/apache/solr/search/QueryParsing.java
index 5b635029c6f..98029a68e03 100644
--- a/solr/core/src/java/org/apache/solr/search/QueryParsing.java
+++ b/solr/core/src/java/org/apache/solr/search/QueryParsing.java
@@ -298,7 +298,7 @@ public class QueryParsing {
} else if (c.isRequired()) {
out.append('+');
}
- Query subQuery = c.getQuery();
+ Query subQuery = c.query();
toString(subQuery, schema, out, subflag | FLAG_IS_CLAUSE);
}
diff --git a/solr/core/src/java/org/apache/solr/search/QueryUtils.java b/solr/core/src/java/org/apache/solr/search/QueryUtils.java
index 954ed91b0d4..60538d73a31 100644
--- a/solr/core/src/java/org/apache/solr/search/QueryUtils.java
+++ b/solr/core/src/java/org/apache/solr/search/QueryUtils.java
@@ -164,7 +164,7 @@ public class QueryUtils {
if (clauses.size() == 1) {
// if only one clause, dispense with the wrapping BooleanQuery
- Query negClause = clauses.iterator().next().getQuery();
+ Query negClause = clauses.iterator().next().query();
// we shouldn't need to worry about adjusting the boosts since the negative
// clause would have never been selected in a positive query, and hence would
// not contribute to a score.
@@ -175,7 +175,7 @@ public class QueryUtils {
// the inverse of -a -b is a OR b
for (BooleanClause clause : clauses) {
- newBqB.add(clause.getQuery(), BooleanClause.Occur.SHOULD);
+ newBqB.add(clause.query(), BooleanClause.Occur.SHOULD);
}
return newBqB.build();
}
diff --git a/solr/core/src/java/org/apache/solr/search/ReRankCollector.java b/solr/core/src/java/org/apache/solr/search/ReRankCollector.java
index 13db7d42c29..0851922e995 100644
--- a/solr/core/src/java/org/apache/solr/search/ReRankCollector.java
+++ b/solr/core/src/java/org/apache/solr/search/ReRankCollector.java
@@ -35,7 +35,8 @@ import org.apache.lucene.search.Sort;
import org.apache.lucene.search.TopDocs;
import org.apache.lucene.search.TopDocsCollector;
import org.apache.lucene.search.TopFieldCollector;
-import org.apache.lucene.search.TopScoreDocCollector;
+import org.apache.lucene.search.TopFieldCollectorManager;
+import org.apache.lucene.search.TopScoreDocCollectorManager;
import org.apache.lucene.util.BytesRef;
import org.apache.solr.common.SolrException;
import org.apache.solr.handler.component.QueryElevationComponent;
@@ -88,11 +89,17 @@ public class ReRankCollector extends TopDocsCollector<ScoreDoc> {
int numHits = Math.min(Math.max(this.reRankDocs, length), maxDoc);
if (sort == null) {
this.sort = null;
- this.mainCollector = TopScoreDocCollector.create(numHits, cmd.getMinExactCount());
+ int totalHitsThreshold = cmd.getMinExactCount();
+ TopScoreDocCollectorManager manager =
+ new TopScoreDocCollectorManager(numHits, null, totalHitsThreshold);
+ this.mainCollector = manager.newCollector();
} else {
this.sort = sort = sort.rewrite(searcher);
// scores are needed for Rescorer (regardless of whether sort needs it)
- this.mainCollector = TopFieldCollector.create(sort, numHits, cmd.getMinExactCount());
+ int totalHitsThreshold = cmd.getMinExactCount();
+ TopFieldCollectorManager fieldManager =
+ new TopFieldCollectorManager(sort, numHits, null, totalHitsThreshold);
+ this.mainCollector = fieldManager.newCollector();
}
this.searcher = searcher;
this.reRankQueryRescorer = reRankQueryRescorer;
@@ -120,7 +127,7 @@ public class ReRankCollector extends TopDocsCollector<ScoreDoc> {
TopDocs mainDocs = mainCollector.topDocs(0, Math.max(reRankDocs, length));
- if (mainDocs.totalHits.value == 0 || mainDocs.scoreDocs.length == 0) {
+ if (mainDocs.totalHits.value() == 0 || mainDocs.scoreDocs.length == 0) {
return mainDocs;
}
diff --git a/solr/core/src/java/org/apache/solr/search/SolrDocumentFetcher.java b/solr/core/src/java/org/apache/solr/search/SolrDocumentFetcher.java
index efd382a0fce..98fe9ca30f7 100644
--- a/solr/core/src/java/org/apache/solr/search/SolrDocumentFetcher.java
+++ b/solr/core/src/java/org/apache/solr/search/SolrDocumentFetcher.java
@@ -374,7 +374,7 @@ public class SolrDocumentFetcher {
Predicate<String> readAsBytes = ResultContext.READASBYTES.get();
if (readAsBytes != null && readAsBytes.test(fieldInfo.name)) {
final FieldType ft = new FieldType(TextField.TYPE_STORED);
- ft.setStoreTermVectors(fieldInfo.hasVectors());
+ ft.setStoreTermVectors(fieldInfo.hasTermVectors());
ft.setOmitNorms(fieldInfo.omitsNorms());
ft.setIndexOptions(fieldInfo.getIndexOptions());
Objects.requireNonNull(value, "String value should not be null");
@@ -683,9 +683,8 @@ public class SolrDocumentFetcher {
final SortedSetDocValues values = e.getSortedSetDocValues(localId, leafReader, readerOrd);
if (values != null) {
final List<Object> outValues = new ArrayList<>();
- for (long ord = values.nextOrd();
- ord != SortedSetDocValues.NO_MORE_ORDS;
- ord = values.nextOrd()) {
+ for (int i = 0; i < values.docValueCount(); i++) {
+ long ord = values.nextOrd();
BytesRef value = values.lookupOrd(ord);
outValues.add(e.schemaField.getType().toObject(e.schemaField, value));
}
diff --git a/solr/core/src/java/org/apache/solr/search/SolrIndexSearcher.java b/solr/core/src/java/org/apache/solr/search/SolrIndexSearcher.java
index 2e1c31691ca..4c44e58fe2b 100644
--- a/solr/core/src/java/org/apache/solr/search/SolrIndexSearcher.java
+++ b/solr/core/src/java/org/apache/solr/search/SolrIndexSearcher.java
@@ -46,7 +46,6 @@ import org.apache.lucene.document.Document;
import org.apache.lucene.index.DirectoryReader;
import org.apache.lucene.index.ExitableDirectoryReader;
import org.apache.lucene.index.FieldInfos;
-import org.apache.lucene.index.IndexReader;
import org.apache.lucene.index.LeafReader;
import org.apache.lucene.index.LeafReaderContext;
import org.apache.lucene.index.MultiPostingsEnum;
@@ -64,6 +63,7 @@ import org.apache.lucene.search.DocIdSetIterator;
import org.apache.lucene.search.Explanation;
import org.apache.lucene.search.FieldDoc;
import org.apache.lucene.search.IndexSearcher;
+import org.apache.lucene.search.IndexSearcher.LeafReaderContextPartition;
import org.apache.lucene.search.LeafCollector;
import org.apache.lucene.search.MatchAllDocsQuery;
import org.apache.lucene.search.MultiCollector;
@@ -77,12 +77,12 @@ import org.apache.lucene.search.SortField;
import org.apache.lucene.search.SortField.Type;
import org.apache.lucene.search.TermQuery;
import org.apache.lucene.search.TermStatistics;
-import org.apache.lucene.search.TimeLimitingCollector;
import org.apache.lucene.search.TopDocs;
import org.apache.lucene.search.TopDocsCollector;
import org.apache.lucene.search.TopFieldCollector;
+import org.apache.lucene.search.TopFieldCollectorManager;
import org.apache.lucene.search.TopFieldDocs;
-import org.apache.lucene.search.TopScoreDocCollector;
+import org.apache.lucene.search.TopScoreDocCollectorManager;
import org.apache.lucene.search.TotalHitCountCollector;
import org.apache.lucene.search.TotalHits;
import org.apache.lucene.search.TotalHits.Relation;
@@ -133,6 +133,15 @@ import org.slf4j.LoggerFactory;
* @since solr 0.9
*/
public class SolrIndexSearcher extends IndexSearcher implements Closeable, SolrInfoBean {
+ /*
+ * Timeout strategy (Lucene 10):
+ * - Primary mechanism is IndexSearcher.setTimeout(QueryTimeout), wired to Solr's QueryLimits
+ * via QueryLimitsTimeout. After a search, timedOut() is consulted to flag partial results.
+ * - Optionally, ExitableDirectoryReader can be enabled for instrumentation/back-compat via the
+ * system property 'solr.useExitableDirectoryReader'. In that case, readers are wrapped with the
+ * same QueryLimitsTimeout implementation so both approaches are consistent.
+ * - TimeLimitingCollector is no longer used in Lucene 10.
+ */
private static final Logger log = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
@@ -207,8 +216,8 @@ public class SolrIndexSearcher extends IndexSearcher implements Closeable, SolrI
}
}
- private static final class QueryLimitsTimeout implements QueryTimeout {
- private static final QueryLimitsTimeout INSTANCE = new QueryLimitsTimeout();
+ public static final class QueryLimitsTimeout implements QueryTimeout {
+ public static final QueryLimitsTimeout INSTANCE = new QueryLimitsTimeout();
private QueryLimitsTimeout() {}
@@ -237,8 +246,8 @@ public class SolrIndexSearcher extends IndexSearcher implements Closeable, SolrI
}
/**
- * Create an {@link ExecutorService} to be used by the Lucene {@link IndexSearcher#getExecutor()}.
- * Shared across the whole node because it's a machine CPU resource.
+ * Create an {@link ExecutorService} to be used by the Lucene {@link IndexSearcher}. Shared across
+ * the whole node because it's a machine CPU resource.
*/
public static ExecutorService initCollectorExecutor(NodeConfig cfg) {
int indexSearcherExecutorThreads = cfg.getIndexSearcherExecutorThreads();
@@ -309,13 +318,6 @@ public class SolrIndexSearcher extends IndexSearcher implements Closeable, SolrI
collector = new EarlyTerminatingCollector(collector, cmd.getMaxHitsAllowed());
}
- final long timeAllowed = cmd.getTimeAllowed();
- if (timeAllowed > 0) {
- collector =
- new TimeLimitingCollector(
- collector, TimeLimitingCollector.getGlobalCounter(), timeAllowed);
- }
-
if (postFilter != null) {
postFilter.setLastDelegate(collector);
collector = postFilter;
@@ -329,9 +331,25 @@ public class SolrIndexSearcher extends IndexSearcher implements Closeable, SolrI
.addShardLevelActiveQuery(cmd.getQueryID(), (CancellableCollector) collector);
}
+ final long timeAllowed = cmd.getTimeAllowed();
+
+ // Apply timeout using IndexSearcher.setTimeout if needed
+ if (timeAllowed > 0) {
+ super.setTimeout(QueryLimitsTimeout.INSTANCE);
+ }
+
try {
try {
- super.search(query, collector);
+ // Use this.search instead of super.search to ensure our overridden method
+ // with QueryLimits checking is called
+ this.search(query, collector);
+
+ // Check for timeout after search
+ if (timeAllowed > 0 && super.timedOut()) {
+ log.warn("Query timed out: [{}]", query);
+ qr.setPartialResults(true);
+ }
+
} finally {
// The complete() method can use the collectors, so this needs to be surrounded by the same
// catch logic that limit collecting
@@ -339,8 +357,7 @@ public class SolrIndexSearcher extends IndexSearcher implements Closeable, SolrI
((DelegatingCollector) collector).complete();
}
}
- } catch (TimeLimitingCollector.TimeExceededException
- | ExitableDirectoryReader.ExitingReaderException
+ } catch (ExitableDirectoryReader.ExitingReaderException
| CancellableCollector.QueryCancelledException x) {
log.warn("Query: [{}]; ", query, x);
qr.setPartialResults(true);
@@ -368,7 +385,8 @@ public class SolrIndexSearcher extends IndexSearcher implements Closeable, SolrI
SolrIndexConfig config,
String name,
boolean enableCache,
- DirectoryFactory directoryFactory)
+ DirectoryFactory directoryFactory,
+ int maxBooleanClauses)
throws IOException {
// We don't need to reserve the directory because we get it from the factory
this(
@@ -380,7 +398,8 @@ public class SolrIndexSearcher extends IndexSearcher implements Closeable, SolrI
true,
enableCache,
false,
- directoryFactory);
+ directoryFactory,
+ maxBooleanClauses);
// Release the directory at close.
this.releaseDirectory = true;
}
@@ -395,7 +414,8 @@ public class SolrIndexSearcher extends IndexSearcher implements Closeable, SolrI
boolean closeReader,
boolean enableCache,
boolean reserveDirectory,
- DirectoryFactory directoryFactory)
+ DirectoryFactory directoryFactory,
+ int maxBooleanClauses)
throws IOException {
super(wrapReader(core, r), core.getCoreContainer().getIndexSearcherExecutor());
@@ -416,6 +436,9 @@ public class SolrIndexSearcher extends IndexSearcher implements Closeable, SolrI
+ (name != null ? " " + name : "");
log.debug("Opening [{}]", this.name);
+ // Set max clause count for this searcher instance
+ setMaxClauseCount(maxBooleanClauses);
+
if (directoryFactory.searchersReserveCommitPoints()) {
// reserve commit point for life of searcher
// TODO: This may not be safe w/softCommit, see SOLR-13908
@@ -424,7 +447,7 @@ public class SolrIndexSearcher extends IndexSearcher implements Closeable, SolrI
if (reserveDirectory) {
// Keep the directory from being released while we use it.
- directoryFactory.incRef(getIndexReader().directory());
+ directoryFactory.incRef(getRawReader().directory());
// Make sure to release it when closing.
this.releaseDirectory = true;
}
@@ -661,7 +684,7 @@ public class SolrIndexSearcher extends IndexSearcher implements Closeable, SolrI
}
if (releaseDirectory) {
- directoryFactory.release(getIndexReader().directory());
+ directoryFactory.release(getRawReader().directory());
}
try {
@@ -788,29 +811,43 @@ public class SolrIndexSearcher extends IndexSearcher implements Closeable, SolrI
return qr;
}
+ // Override the deprecated search method to ensure QueryLimits are checked in Lucene 10
+ // In Lucene 10, this method no longer calls search(LeafReaderContextPartition[], Weight,
+ // Collector)
+ // so we need to route it through our partition-based method to maintain QueryLimits checking
@Override
- protected void search(List<LeafReaderContext> leaves, Weight weight, Collector collector)
+ public void search(Query query, Collector collector) throws IOException {
+ // Route through the partition-based method which has our QueryLimits logic
+ query = rewrite(query);
+ Weight weight = createWeight(query, collector.scoreMode(), 1);
+
+ // Create partitions for sequential search (one partition per leaf context)
+ LeafReaderContextPartition[] partitions = new LeafReaderContextPartition[leafContexts.size()];
+ for (int i = 0; i < leafContexts.size(); i++) {
+ partitions[i] = LeafReaderContextPartition.createForEntireSegment(leafContexts.get(i));
+ }
+
+ // Call our overridden search method that handles QueryLimits
+ search(partitions, weight, collector);
+ }
+
+ @Override
+ protected void search(LeafReaderContextPartition[] partitions, Weight weight, Collector collector)
throws IOException {
QueryLimits queryLimits = QueryLimits.getCurrentLimits();
- if (EnvUtils.getPropertyAsBool(EXITABLE_READER_PROPERTY, Boolean.FALSE)
- || !queryLimits.isLimitsEnabled()) {
- // no timeout. Pass through to super class
- super.search(leaves, weight, collector);
+ boolean useExitableReader = EnvUtils.getPropertyAsBool(EXITABLE_READER_PROPERTY, Boolean.FALSE);
+
+ if (useExitableReader || !queryLimits.isLimitsEnabled()) {
+ // no timeout - pass through to super class
+ super.search(partitions, weight, collector);
} else {
- // Timeout enabled! This impl is maybe a hack. Use Lucene's IndexSearcher timeout.
- // But only some queries have it so don't use on "this" (SolrIndexSearcher), not to mention
- // that timedOut() might race with concurrent queries (dubious design).
- // So we need to make a new IndexSearcher instead of using "this".
- new IndexSearcher(reader) { // cheap, actually!
- void searchWithTimeout() throws IOException {
- setTimeout(queryLimits); // Lucene's method name is less than ideal here...
- super.search(leaves, weight, collector); // FYI protected access
- if (timedOut()) {
- throw new QueryLimitsExceededException(
- "Limits exceeded! (search): " + queryLimits.limitStatusMessage());
- }
- }
- }.searchWithTimeout();
+ // Timeout enabled - use thread-local setTimeout system
+ setTimeout(QueryLimitsTimeout.INSTANCE);
+ super.search(partitions, weight, collector);
+ if (timedOut()) {
+ throw new ExitableDirectoryReader.ExitingReaderException(
+ "Query limits exceeded: " + queryLimits.limitStatusMessage());
+ }
}
}
@@ -819,7 +856,6 @@ public class SolrIndexSearcher extends IndexSearcher implements Closeable, SolrI
*
* @see SolrDocumentFetcher
*/
- @Override
@Deprecated
public Document doc(int docId) throws IOException {
return doc(docId, (Set<String>) null);
@@ -829,10 +865,8 @@ public class SolrIndexSearcher extends IndexSearcher implements Closeable, SolrI
* Visit a document's fields using a {@link StoredFieldVisitor}. This method does not currently
* add to the Solr document cache.
*
- * @see IndexReader#document(int, StoredFieldVisitor)
* @see SolrDocumentFetcher
*/
- @Override
@Deprecated
public final void doc(int docId, StoredFieldVisitor visitor) throws IOException {
getDocFetcher().doc(docId, visitor);
@@ -846,7 +880,6 @@ public class SolrIndexSearcher extends IndexSearcher implements Closeable, SolrI
*
* @see SolrDocumentFetcher
*/
- @Override
@Deprecated
public final Document doc(int i, Set<String> fields) throws IOException {
return getDocFetcher().doc(i, fields);
@@ -1200,7 +1233,9 @@ public class SolrIndexSearcher extends IndexSearcher implements Closeable, SolrI
Query query = pf.filter != null ? pf.filter : MATCH_ALL_DOCS_QUERY;
- search(query, collector);
+ // Use deprecated method for now during Lucene 10 migration
+ // TODO: Replace with proper CollectorManager implementation that respects safety checks
+ super.search(query, collector);
if (collector instanceof DelegatingCollector) {
((DelegatingCollector) collector).complete();
@@ -1406,7 +1441,7 @@ public class SolrIndexSearcher extends IndexSearcher implements Closeable, SolrI
for (int subindex = 0; subindex < numSubs; subindex++) {
MultiPostingsEnum.EnumWithSlice sub = subs[subindex];
if (sub.postingsEnum == null) continue;
- int base = sub.slice.start;
+ int base = sub.slice.start();
int docid;
if (largestPossible > docs.length) {
@@ -1816,7 +1851,7 @@ public class SolrIndexSearcher extends IndexSearcher implements Closeable, SolrI
if (scoreModeUsed == ScoreMode.COMPLETE || scoreModeUsed == ScoreMode.COMPLETE_NO_SCORES) {
return TotalHits.Relation.EQUAL_TO;
} else {
- return topDocs.totalHits.relation;
+ return topDocs.totalHits.relation();
}
}
@@ -1870,6 +1905,7 @@ public class SolrIndexSearcher extends IndexSearcher implements Closeable, SolrI
*/
TopDocsCollector<? extends ScoreDoc> buildTopDocsCollector(int len, QueryCommand cmd)
throws IOException {
+
int minNumFound = cmd.getMinExactCount();
Query q = cmd.getQuery();
if (q instanceof RankQuery rq) {
@@ -1878,14 +1914,16 @@ public class SolrIndexSearcher extends IndexSearcher implements Closeable, SolrI
if (null == cmd.getSort()) {
assert null == cmd.getCursorMark() : "have cursor but no sort";
- return TopScoreDocCollector.create(len, minNumFound);
+
+ return new TopScoreDocCollectorManager(len, null, minNumFound).newCollector();
} else {
// we have a sort
final Sort weightedSort = weightSort(cmd.getSort());
final CursorMark cursor = cmd.getCursorMark();
-
final FieldDoc searchAfter = (null != cursor ? cursor.getSearchAfterFieldDoc() : null);
- return TopFieldCollector.create(weightedSort, len, searchAfter, minNumFound);
+
+ return new TopFieldCollectorManager(weightedSort, len, searchAfter, minNumFound)
+ .newCollector();
}
}
@@ -1958,9 +1996,13 @@ public class SolrIndexSearcher extends IndexSearcher implements Closeable, SolrI
}
final TopDocs topDocs;
final ScoreMode scoreModeUsed;
- if (!MultiThreadedSearcher.allowMT(pf.postFilter, cmd)) {
- log.trace("SINGLE THREADED search, skipping collector manager in getDocListNC");
+
+ boolean useMultiThreaded =
+ getTaskExecutor() != null && MultiThreadedSearcher.allowMT(pf.postFilter, cmd);
+
+ if (!useMultiThreaded) {
final TopDocsCollector<?> topCollector = buildTopDocsCollector(len, cmd);
+
MaxScoreCollector maxScoreCollector = null;
Collector collector = topCollector;
if (needScores) {
@@ -1978,15 +2020,21 @@ public class SolrIndexSearcher extends IndexSearcher implements Closeable, SolrI
? (maxScoreCollector == null ? Float.NaN : maxScoreCollector.getMaxScore())
: 0.0f;
} else {
- log.trace("MULTI-THREADED search, using CollectorManager int getDocListNC");
+
final MultiThreadedSearcher.SearchResult searchResult =
new MultiThreadedSearcher(this)
.searchCollectorManagers(len, cmd, query, true, needScores, false, qr);
scoreModeUsed = searchResult.scoreMode;
MultiThreadedSearcher.TopDocsResult topDocsResult = searchResult.getTopDocsResult();
- totalHits = topDocsResult.totalHits;
- topDocs = topDocsResult.topDocs;
+
+ if (topDocsResult != null) {
+ totalHits = topDocsResult.totalHits;
+ topDocs = topDocsResult.topDocs;
+ } else {
+ totalHits = 0;
+ topDocs = null;
+ }
maxScore = searchResult.getMaxScore(totalHits);
}
@@ -2069,8 +2117,11 @@ public class SolrIndexSearcher extends IndexSearcher implements Closeable, SolrI
qr.setNextCursorMark(cmd.getCursorMark());
} else {
final TopDocs topDocs;
- if (!MultiThreadedSearcher.allowMT(pf.postFilter, cmd)) {
- log.trace("SINGLE THREADED search, skipping collector manager in getDocListAndSetNC");
+ // Use multi-threaded path only if allowMT() permits it
+ boolean useMultiThreaded =
+ getTaskExecutor() != null && MultiThreadedSearcher.allowMT(pf.postFilter, cmd);
+
+ if (!useMultiThreaded) {
@SuppressWarnings({"rawtypes"})
final TopDocsCollector<? extends ScoreDoc> topCollector = buildTopDocsCollector(len, cmd);
@@ -2098,16 +2149,24 @@ public class SolrIndexSearcher extends IndexSearcher implements Closeable, SolrI
? (maxScoreCollector == null ? Float.NaN : maxScoreCollector.getMaxScore())
: 0.0f;
} else {
- log.trace("MULTI-THREADED search, using CollectorManager in getDocListAndSetNC");
MultiThreadedSearcher.SearchResult searchResult =
new MultiThreadedSearcher(this)
.searchCollectorManagers(len, cmd, query, true, needScores, true, qr);
+
MultiThreadedSearcher.TopDocsResult topDocsResult = searchResult.getTopDocsResult();
- totalHits = topDocsResult.totalHits;
- topDocs = topDocsResult.topDocs;
+
+ if (topDocsResult != null) {
+ totalHits = topDocsResult.totalHits;
+ topDocs = topDocsResult.topDocs;
+ } else {
+ totalHits = 0;
+ topDocs = null;
+ }
+
maxScore = searchResult.getMaxScore(totalHits);
set = new BitDocSet(searchResult.getFixedBitSet());
+
// TODO: Think about using ScoreMode from searchResult down below
}
final Relation relation =
@@ -2119,6 +2178,7 @@ public class SolrIndexSearcher extends IndexSearcher implements Closeable, SolrI
}
qr.setDocList(docList);
+
// TODO: if we collect results before the filter, we just need to intersect with
// that filter to generate the DocSet for qr.setDocSet()
qr.setDocSet(set);
@@ -2381,10 +2441,16 @@ public class SolrIndexSearcher extends IndexSearcher implements Closeable, SolrI
ids[i] = scoreDoc.doc;
}
- assert topDocs.totalHits.relation == TotalHits.Relation.EQUAL_TO;
+ assert topDocs.totalHits.relation() == TotalHits.Relation.EQUAL_TO;
qr.getDocListAndSet().docList =
new DocSlice(
- 0, nDocsReturned, ids, null, topDocs.totalHits.value, 0.0f, topDocs.totalHits.relation);
+ 0,
+ nDocsReturned,
+ ids,
+ null,
+ topDocs.totalHits.value(),
+ 0.0f,
+ topDocs.totalHits.relation());
populateNextCursorMarkFromTopDocs(qr, cmd, topDocs);
}
diff --git a/solr/core/src/java/org/apache/solr/search/TermsQParserPlugin.java b/solr/core/src/java/org/apache/solr/search/TermsQParserPlugin.java
index 78297666f27..bbf29bd2708 100644
--- a/solr/core/src/java/org/apache/solr/search/TermsQParserPlugin.java
+++ b/solr/core/src/java/org/apache/solr/search/TermsQParserPlugin.java
@@ -24,7 +24,6 @@ import java.util.regex.Pattern;
import org.apache.lucene.document.SortedSetDocValuesField;
import org.apache.lucene.index.DocValues;
import org.apache.lucene.index.LeafReaderContext;
-import org.apache.lucene.index.PrefixCodedTerms;
import org.apache.lucene.index.SortedSetDocValues;
import org.apache.lucene.index.Term;
import org.apache.lucene.search.AutomatonQuery;
@@ -39,6 +38,7 @@ import org.apache.lucene.search.MultiTermQuery;
import org.apache.lucene.search.Query;
import org.apache.lucene.search.ScoreMode;
import org.apache.lucene.search.Scorer;
+import org.apache.lucene.search.ScorerSupplier;
import org.apache.lucene.search.TermInSetQuery;
import org.apache.lucene.search.TermQuery;
import org.apache.lucene.search.TwoPhaseIterator;
@@ -82,7 +82,7 @@ public class TermsQParserPlugin extends QParserPlugin {
termsFilter {
@Override
Query makeFilter(String fname, BytesRef[] bytesRefs) {
- return new TermInSetQuery(fname, bytesRefs); // constant scores
+ return new TermInSetQuery(fname, Arrays.asList(bytesRefs)); // constant scores
}
},
booleanQuery {
@@ -193,13 +193,15 @@ public class TermsQParserPlugin extends QParserPlugin {
private static class TopLevelDocValuesTermsQuery extends TermInSetQuery {
private final String fieldName;
+ private final BytesRef[] terms;
private SortedSetDocValues topLevelDocValues;
private LongBitSet topLevelTermOrdinals;
private boolean matchesAtLeastOneTerm = false;
public TopLevelDocValuesTermsQuery(String field, BytesRef... terms) {
- super(MultiTermQuery.DOC_VALUES_REWRITE, field, terms);
+ super(MultiTermQuery.DOC_VALUES_REWRITE, field, Arrays.asList(terms));
this.fieldName = field;
+ this.terms = terms;
}
@Override
@@ -215,10 +217,9 @@ public class TermsQParserPlugin extends QParserPlugin {
topLevelDocValues =
DocValues.getSortedSet(((SolrIndexSearcher) searcher).getSlowAtomicReader(), fieldName);
topLevelTermOrdinals = new LongBitSet(topLevelDocValues.getValueCount());
- PrefixCodedTerms.TermIterator iterator = getTermData().iterator();
long lastTermOrdFound = 0;
- for (BytesRef term = iterator.next(); term != null; term = iterator.next()) {
+ for (BytesRef term : terms) {
long currentTermOrd = lookupTerm(topLevelDocValues, term, lastTermOrdFound);
if (currentTermOrd >= 0L) {
matchesAtLeastOneTerm = true;
@@ -229,7 +230,7 @@ public class TermsQParserPlugin extends QParserPlugin {
return new ConstantScoreWeight(this, boost) {
@Override
- public Scorer scorer(LeafReaderContext context) throws IOException {
+ public ScorerSupplier scorerSupplier(LeafReaderContext context) throws IOException {
if (!matchesAtLeastOneTerm) {
return null;
}
@@ -240,30 +241,39 @@ public class TermsQParserPlugin extends QParserPlugin {
}
final int docBase = context.docBase;
- return new ConstantScoreScorer(
- this,
- this.score(),
- scoreMode,
- new TwoPhaseIterator(segmentDocValues) {
- @Override
- public boolean matches() throws IOException {
- topLevelDocValues.advanceExact(docBase + approximation.docID());
- for (long ord = topLevelDocValues.nextOrd();
- ord != -1L;
- ord = topLevelDocValues.nextOrd()) {
- if (topLevelTermOrdinals.get(ord)) {
- return true;
+ final float score = this.score();
+ return new ScorerSupplier() {
+ @Override
+ public Scorer get(long leadCost) throws IOException {
+ return new ConstantScoreScorer(
+ score,
+ scoreMode,
+ new TwoPhaseIterator(segmentDocValues) {
+ @Override
+ public boolean matches() throws IOException {
+ topLevelDocValues.advanceExact(docBase + approximation.docID());
+ for (int i = 0; i < topLevelDocValues.docValueCount(); i++) {
+ long ord = topLevelDocValues.nextOrd();
+ if (topLevelTermOrdinals.get(ord)) {
+ return true;
+ }
+ }
+
+ return false;
}
- }
- return false;
- }
+ @Override
+ public float matchCost() {
+ return 10.0F;
+ }
+ });
+ }
- @Override
- public float matchCost() {
- return 10.0F;
- }
- });
+ @Override
+ public long cost() {
+ return segmentDocValues.getValueCount();
+ }
+ };
}
@Override
diff --git a/solr/core/src/java/org/apache/solr/search/TopLevelJoinQuery.java b/solr/core/src/java/org/apache/solr/search/TopLevelJoinQuery.java
index bbaae01f2ca..1012ae0157e 100644
--- a/solr/core/src/java/org/apache/solr/search/TopLevelJoinQuery.java
+++ b/solr/core/src/java/org/apache/solr/search/TopLevelJoinQuery.java
@@ -31,6 +31,7 @@ import org.apache.lucene.search.IndexSearcher;
import org.apache.lucene.search.Query;
import org.apache.lucene.search.ScoreMode;
import org.apache.lucene.search.Scorer;
+import org.apache.lucene.search.ScorerSupplier;
import org.apache.lucene.search.TwoPhaseIterator;
import org.apache.lucene.search.Weight;
import org.apache.lucene.util.BytesRef;
@@ -88,7 +89,7 @@ public class TopLevelJoinQuery extends JoinQuery implements SolrSearcherRequirer
final boolean toMultivalued = toSearcher.getSchema().getFieldOrNull(toField).multiValued();
return new ConstantScoreWeight(this, boost) {
@Override
- public Scorer scorer(LeafReaderContext context) throws IOException {
+ public ScorerSupplier scorerSupplier(LeafReaderContext context) throws IOException {
if (toBitsetBounds.lower == BitsetBounds.NO_MATCHES) {
return null;
}
@@ -101,33 +102,42 @@ public class TopLevelJoinQuery extends JoinQuery implements SolrSearcherRequirer
return null;
}
- final int docBase = context.docBase;
- return new ConstantScoreScorer(
- this,
- this.score(),
- scoreMode,
- new TwoPhaseIterator(toApproximation) {
- @Override
- public boolean matches() throws IOException {
- final boolean hasDoc =
- topLevelToDocValues.advanceExact(docBase + approximation.docID());
- if (hasDoc) {
- for (long ord = topLevelToDocValues.nextOrd();
- ord != -1L;
- ord = topLevelToDocValues.nextOrd()) {
- if (toOrdBitSet.get(ord)) {
- return true;
+ return new ScorerSupplier() {
+ @Override
+ public Scorer get(long leadCost) throws IOException {
+
+ final int docBase = context.docBase;
+ return new ConstantScoreScorer(
+ score(),
+ scoreMode,
+ new TwoPhaseIterator(toApproximation) {
+ @Override
+ public boolean matches() throws IOException {
+ final boolean hasDoc =
+ topLevelToDocValues.advanceExact(docBase + approximation.docID());
+ if (hasDoc) {
+ for (int i = 0; i < topLevelToDocValues.docValueCount(); i++) {
+ long ord = topLevelToDocValues.nextOrd();
+ if (toOrdBitSet.get(ord)) {
+ return true;
+ }
+ }
}
+ return false;
}
- }
- return false;
- }
-
- @Override
- public float matchCost() {
- return 10.0F;
- }
- });
+
+ @Override
+ public float matchCost() {
+ return 10.0F;
+ }
+ });
+ }
+
+ @Override
+ public long cost() {
+ return toOrdBitSet.cardinality();
+ }
+ };
}
@Override
@@ -143,7 +153,7 @@ public class TopLevelJoinQuery extends JoinQuery implements SolrSearcherRequirer
private Weight createNoMatchesWeight(float boost) {
return new ConstantScoreWeight(this, boost) {
@Override
- public Scorer scorer(LeafReaderContext context) throws IOException {
+ public ScorerSupplier scorerSupplier(LeafReaderContext context) throws IOException {
return null;
}
diff --git a/solr/core/src/java/org/apache/solr/search/WrappedQuery.java b/solr/core/src/java/org/apache/solr/search/WrappedQuery.java
index 812fec3c36b..cd7f5a6795a 100644
--- a/solr/core/src/java/org/apache/solr/search/WrappedQuery.java
+++ b/solr/core/src/java/org/apache/solr/search/WrappedQuery.java
@@ -17,7 +17,6 @@
package org.apache.solr.search;
import java.io.IOException;
-import org.apache.lucene.index.IndexReader;
import org.apache.lucene.search.IndexSearcher;
import org.apache.lucene.search.Query;
import org.apache.lucene.search.QueryVisitor;
@@ -47,9 +46,9 @@ public final class WrappedQuery extends ExtendedQueryBase {
}
@Override
- public Query rewrite(IndexReader reader) throws IOException {
+ public Query rewrite(IndexSearcher searcher) throws IOException {
// currently no need to continue wrapping at this point.
- return q.rewrite(reader);
+ return q.rewrite(searcher);
}
@Override
diff --git a/solr/core/src/java/org/apache/solr/search/facet/AvgAgg.java b/solr/core/src/java/org/apache/solr/search/facet/AvgAgg.java
index 1a6e79e0924..3ac33911a59 100644
--- a/solr/core/src/java/org/apache/solr/search/facet/AvgAgg.java
+++ b/solr/core/src/java/org/apache/solr/search/facet/AvgAgg.java
@@ -22,7 +22,6 @@ import java.util.ArrayList;
import java.util.Arrays;
import java.util.Date;
import java.util.List;
-import org.apache.lucene.index.SortedSetDocValues;
import org.apache.lucene.queries.function.ValueSource;
import org.apache.lucene.util.BytesRef;
import org.apache.solr.common.SolrException;
@@ -152,7 +151,8 @@ public class AvgAgg extends SimpleAggValueSource {
@Override
protected void collectValues(int doc, int slot) throws IOException {
long ord;
- while ((ord = values.nextOrd()) != SortedSetDocValues.NO_MORE_ORDS) {
+ for (int i = 0; i < values.docValueCount(); i++) {
+ ord = values.nextOrd();
BytesRef term = values.lookupOrd(ord);
Object obj = sf.getType().toObject(sf, term);
double val = obj instanceof Date ? ((Date) obj).getTime() : ((Number) obj).doubleValue();
diff --git a/solr/core/src/java/org/apache/solr/search/facet/CountValsAgg.java b/solr/core/src/java/org/apache/solr/search/facet/CountValsAgg.java
index e4994ddb25f..f5c8ff7752d 100644
--- a/solr/core/src/java/org/apache/solr/search/facet/CountValsAgg.java
+++ b/solr/core/src/java/org/apache/solr/search/facet/CountValsAgg.java
@@ -20,7 +20,6 @@ package org.apache.solr.search.facet;
import java.io.IOException;
import java.util.Arrays;
import java.util.function.IntFunction;
-import org.apache.lucene.index.SortedSetDocValues;
import org.apache.lucene.queries.function.ValueSource;
import org.apache.solr.common.SolrException;
import org.apache.solr.schema.SchemaField;
@@ -102,7 +101,8 @@ public class CountValsAgg extends SimpleAggValueSource {
@Override
protected void collectValues(int doc, int slot) throws IOException {
- while (values.nextOrd() != SortedSetDocValues.NO_MORE_ORDS) {
+ for (int i = 0; i < values.docValueCount(); i++) {
+ values.nextOrd();
result[slot]++;
}
}
diff --git a/solr/core/src/java/org/apache/solr/search/facet/DocValuesAcc.java b/solr/core/src/java/org/apache/solr/search/facet/DocValuesAcc.java
index fddfcf92118..9caf0a9986e 100644
--- a/solr/core/src/java/org/apache/solr/search/facet/DocValuesAcc.java
+++ b/solr/core/src/java/org/apache/solr/search/facet/DocValuesAcc.java
@@ -376,7 +376,8 @@ public abstract class DocValuesAcc extends SlotAcc {
@Override
protected void collectValues(int doc, int slot) throws IOException {
long ord;
- while ((ord = values.nextOrd()) != SortedSetDocValues.NO_MORE_ORDS) {
+ for (int i = 0; i < values.docValueCount(); i++) {
+ ord = values.nextOrd();
BytesRef term = values.lookupOrd(ord);
Object obj = sf.getType().toObject(sf, term);
double val = obj instanceof Date ? ((Date) obj).getTime() : ((Number) obj).doubleValue();
diff --git a/solr/core/src/java/org/apache/solr/search/facet/FacetFieldProcessorByArrayDV.java b/solr/core/src/java/org/apache/solr/search/facet/FacetFieldProcessorByArrayDV.java
index c41134860a3..6b396380cee 100644
--- a/solr/core/src/java/org/apache/solr/search/facet/FacetFieldProcessorByArrayDV.java
+++ b/solr/core/src/java/org/apache/solr/search/facet/FacetFieldProcessorByArrayDV.java
@@ -272,9 +272,8 @@ class FacetFieldProcessorByArrayDV extends FacetFieldProcessorByArray {
while ((doc = disi.nextDoc()) != DocIdSetIterator.NO_MORE_DOCS) {
if (multiDv.advanceExact(doc)) {
final int maxIdx = disi.registerCounts(segCounter);
- for (; ; ) {
+ for (int i = 0; i < multiDv.docValueCount(); i++) {
int segOrd = (int) multiDv.nextOrd();
- if (segOrd < 0) break;
segCounter.incrementCount(segOrd, 1, maxIdx);
}
}
@@ -369,9 +368,8 @@ class FacetFieldProcessorByArrayDV extends FacetFieldProcessorByArray {
if (multiDv.advanceExact(doc)) {
final int maxIdx = disi.registerCounts(segCounter);
final boolean collectBase = disi.collectBase();
- for (; ; ) {
+ for (int i = 0; i < multiDv.docValueCount(); i++) {
int segOrd = (int) multiDv.nextOrd();
- if (segOrd < 0) break;
collect(doc, segOrd, toGlobal, segCounter, maxIdx, collectBase);
}
}
@@ -385,9 +383,8 @@ class FacetFieldProcessorByArrayDV extends FacetFieldProcessorByArray {
while ((doc = disi.nextDoc()) != DocIdSetIterator.NO_MORE_DOCS) {
if (multiDv.advanceExact(doc)) {
final int maxIdx = disi.registerCounts(segCounter);
- for (; ; ) {
+ for (int i = 0; i < multiDv.docValueCount(); i++) {
int segOrd = (int) multiDv.nextOrd();
- if (segOrd < 0) break;
int ord = (int) toGlobal.get(segOrd);
segCounter.incrementCount(ord, 1, maxIdx);
}
diff --git a/solr/core/src/java/org/apache/solr/search/facet/FacetFieldProcessorByEnumTermsStream.java b/solr/core/src/java/org/apache/solr/search/facet/FacetFieldProcessorByEnumTermsStream.java
index 08d3bb774b6..acf5e6e9c93 100644
--- a/solr/core/src/java/org/apache/solr/search/facet/FacetFieldProcessorByEnumTermsStream.java
+++ b/solr/core/src/java/org/apache/solr/search/facet/FacetFieldProcessorByEnumTermsStream.java
@@ -301,7 +301,7 @@ class FacetFieldProcessorByEnumTermsStream extends FacetFieldProcessor implement
for (int subindex = 0; subindex < numSubs; subindex++) {
MultiPostingsEnum.EnumWithSlice sub = subs[subindex];
if (sub.postingsEnum == null) continue;
- int base = sub.slice.start;
+ int base = sub.slice.start();
int docid;
if (countOnly) {
@@ -309,7 +309,7 @@ class FacetFieldProcessorByEnumTermsStream extends FacetFieldProcessor implement
if (fastForRandomSet.get(docid + base)) c++;
}
} else {
- setNextReader(leaves[sub.slice.readerIndex]);
+ setNextReader(leaves[sub.slice.readerIndex()]);
while ((docid = sub.postingsEnum.nextDoc()) != DocIdSetIterator.NO_MORE_DOCS) {
if (fastForRandomSet.get(docid + base)) {
c++;
diff --git a/solr/core/src/java/org/apache/solr/search/facet/FacetHeatmap.java b/solr/core/src/java/org/apache/solr/search/facet/FacetHeatmap.java
index 57d69d47c52..557536d3a84 100644
--- a/solr/core/src/java/org/apache/solr/search/facet/FacetHeatmap.java
+++ b/solr/core/src/java/org/apache/solr/search/facet/FacetHeatmap.java
@@ -324,11 +324,11 @@ public class FacetHeatmap extends FacetRequest {
// A PNG graphic; compressed. Good for large & dense heatmaps; hard to consume.
return asPngBytes(columns, rows, counts, debugInfo);
- // TODO case UTFGRID https://github.com/mapbox/utfgrid-spec
- // TODO case skipList: //A sequence of values; negative values are actually how many 0's to
- // insert. Good for small or large but sparse heatmaps.
- // TODO auto choose png or skipList; use skipList when < ~25% full or <= ~512 cells remember
- // to augment error list below when we add more formats.
+ // TODO case UTFGRID https://github.com/mapbox/utfgrid-spec
+ // TODO case skipList: //A sequence of values; negative values are actually how many 0's to
+ // insert. Good for small or large but sparse heatmaps.
+ // TODO auto choose png or skipList; use skipList when < ~25% full or <= ~512 cells remember
+ // to augment error list below when we add more formats.
default:
throw new SolrException(SolrException.ErrorCode.BAD_REQUEST, "Unknown format: " + format);
}
diff --git a/solr/core/src/java/org/apache/solr/search/facet/MinMaxAgg.java b/solr/core/src/java/org/apache/solr/search/facet/MinMaxAgg.java
index efbbfc4d501..cf3426fbc7c 100644
--- a/solr/core/src/java/org/apache/solr/search/facet/MinMaxAgg.java
+++ b/solr/core/src/java/org/apache/solr/search/facet/MinMaxAgg.java
@@ -537,10 +537,13 @@ public class MinMaxAgg extends SimpleAggValueSource {
public void collectValues(int doc, int slotNum) throws IOException {
long newOrd = MISSING;
if (minmax == 1) { // min
- newOrd = subDv.nextOrd();
+ if (subDv.docValueCount() > 0) {
+ newOrd = subDv.nextOrd();
+ }
} else { // max
long ord;
- while ((ord = subDv.nextOrd()) != SortedSetDocValues.NO_MORE_ORDS) {
+ for (int i = 0; i < subDv.docValueCount(); i++) {
+ ord = subDv.nextOrd();
newOrd = ord;
}
}
diff --git a/solr/core/src/java/org/apache/solr/search/facet/MissingAgg.java b/solr/core/src/java/org/apache/solr/search/facet/MissingAgg.java
index e471020345f..ea4ae8f7310 100644
--- a/solr/core/src/java/org/apache/solr/search/facet/MissingAgg.java
+++ b/solr/core/src/java/org/apache/solr/search/facet/MissingAgg.java
@@ -21,7 +21,7 @@ import java.io.IOException;
import java.util.function.IntFunction;
import org.apache.lucene.queries.function.ValueSource;
import org.apache.lucene.queries.function.valuesource.QueryValueSource;
-import org.apache.lucene.search.DocValuesFieldExistsQuery;
+import org.apache.lucene.search.FieldExistsQuery;
import org.apache.lucene.search.Query;
import org.apache.solr.schema.SchemaField;
import org.apache.solr.search.function.FieldNameValueSource;
@@ -45,7 +45,7 @@ public class MissingAgg extends SimpleAggValueSource {
if (sf.multiValued() || sf.getType().multiValuedFieldCache()) {
Query query = null;
if (sf.hasDocValues()) {
- query = new DocValuesFieldExistsQuery(sf.getName());
+ query = new FieldExistsQuery(sf.getName());
} else {
query = sf.getType().getRangeQuery(null, sf, null, null, false, false);
}
diff --git a/solr/core/src/java/org/apache/solr/search/facet/PercentileAgg.java b/solr/core/src/java/org/apache/solr/search/facet/PercentileAgg.java
index 0d0a842f99e..14647150e75 100644
--- a/solr/core/src/java/org/apache/solr/search/facet/PercentileAgg.java
+++ b/solr/core/src/java/org/apache/solr/search/facet/PercentileAgg.java
@@ -355,7 +355,8 @@ public class PercentileAgg extends SimpleAggValueSource {
digests[slot] = digest = new AVLTreeDigest(100);
}
long ord;
- while ((ord = values.nextOrd()) != SortedSetDocValues.NO_MORE_ORDS) {
+ for (int i = 0; i < values.docValueCount(); i++) {
+ ord = values.nextOrd();
BytesRef term = values.lookupOrd(ord);
Object obj = sf.getType().toObject(sf, term);
double val = obj instanceof Date ? ((Date) obj).getTime() : ((Number) obj).doubleValue();
diff --git a/solr/core/src/java/org/apache/solr/search/facet/SumAgg.java b/solr/core/src/java/org/apache/solr/search/facet/SumAgg.java
index 614981e325a..b8119c06cf6 100644
--- a/solr/core/src/java/org/apache/solr/search/facet/SumAgg.java
+++ b/solr/core/src/java/org/apache/solr/search/facet/SumAgg.java
@@ -19,7 +19,6 @@ package org.apache.solr.search.facet;
import java.io.IOException;
import java.io.UncheckedIOException;
import java.util.Date;
-import org.apache.lucene.index.SortedSetDocValues;
import org.apache.lucene.queries.function.ValueSource;
import org.apache.lucene.util.BytesRef;
import org.apache.solr.common.SolrException;
@@ -107,7 +106,8 @@ public class SumAgg extends SimpleAggValueSource {
@Override
protected void collectValues(int doc, int slot) throws IOException {
long ord;
- while ((ord = values.nextOrd()) != SortedSetDocValues.NO_MORE_ORDS) {
+ for (int i = 0; i < values.docValueCount(); i++) {
+ ord = values.nextOrd();
BytesRef term = values.lookupOrd(ord);
Object obj = sf.getType().toObject(sf, term);
double val = obj instanceof Date ? ((Date) obj).getTime() : ((Number) obj).doubleValue();
diff --git a/solr/core/src/java/org/apache/solr/search/facet/SumsqAgg.java b/solr/core/src/java/org/apache/solr/search/facet/SumsqAgg.java
index 6d4983812c5..f264d4b81c6 100644
--- a/solr/core/src/java/org/apache/solr/search/facet/SumsqAgg.java
+++ b/solr/core/src/java/org/apache/solr/search/facet/SumsqAgg.java
@@ -19,7 +19,6 @@ package org.apache.solr.search.facet;
import java.io.IOException;
import java.io.UncheckedIOException;
import java.util.Date;
-import org.apache.lucene.index.SortedSetDocValues;
import org.apache.lucene.queries.function.ValueSource;
import org.apache.lucene.util.BytesRef;
import org.apache.solr.common.SolrException;
@@ -94,7 +93,8 @@ public class SumsqAgg extends SimpleAggValueSource {
@Override
protected void collectValues(int doc, int slot) throws IOException {
long ord;
- while ((ord = values.nextOrd()) != SortedSetDocValues.NO_MORE_ORDS) {
+ for (int i = 0; i < values.docValueCount(); i++) {
+ ord = values.nextOrd();
BytesRef term = values.lookupOrd(ord);
Object obj = sf.getType().toObject(sf, term);
double val = obj instanceof Date ? ((Date) obj).getTime() : ((Number) obj).doubleValue();
diff --git a/solr/core/src/java/org/apache/solr/search/facet/UniqueMultiDvSlotAcc.java b/solr/core/src/java/org/apache/solr/search/facet/UniqueMultiDvSlotAcc.java
index 4670bc54b31..98248275161 100644
--- a/solr/core/src/java/org/apache/solr/search/facet/UniqueMultiDvSlotAcc.java
+++ b/solr/core/src/java/org/apache/solr/search/facet/UniqueMultiDvSlotAcc.java
@@ -76,20 +76,17 @@ class UniqueMultiDvSlotAcc extends UniqueSlotAcc {
throws IOException {
if (subDv.advanceExact(doc)) {
- int segOrd = (int) subDv.nextOrd();
- assert segOrd >= 0;
-
FixedBitSet bits = arr[slotNum];
if (bits == null) {
bits = new FixedBitSet(nTerms);
arr[slotNum] = bits;
}
- do {
+ for (int i = 0; i < subDv.docValueCount(); i++) {
+ int segOrd = (int) subDv.nextOrd();
int ord = toGlobal == null ? segOrd : (int) toGlobal.get(segOrd);
bits.set(ord);
- segOrd = (int) subDv.nextOrd();
- } while (segOrd >= 0);
+ }
}
}
}
diff --git a/solr/core/src/java/org/apache/solr/search/function/ValueSourceRangeFilter.java b/solr/core/src/java/org/apache/solr/search/function/ValueSourceRangeFilter.java
index 6c0d30022e8..12d652ef481 100644
--- a/solr/core/src/java/org/apache/solr/search/function/ValueSourceRangeFilter.java
+++ b/solr/core/src/java/org/apache/solr/search/function/ValueSourceRangeFilter.java
@@ -31,6 +31,7 @@ import org.apache.lucene.search.Query;
import org.apache.lucene.search.QueryVisitor;
import org.apache.lucene.search.ScoreMode;
import org.apache.lucene.search.Scorer;
+import org.apache.lucene.search.ScorerSupplier;
import org.apache.lucene.search.Weight;
/** RangeFilter over a ValueSource. */
@@ -98,8 +99,7 @@ public class ValueSourceRangeFilter extends Query {
public Explanation explain(LeafReaderContext context, int doc) throws IOException {
FunctionValues functionValues = valueSource.getValues(vsContext, context);
ValueSourceScorer scorer =
- functionValues.getRangeScorer(
- this, context, lowerVal, upperVal, includeLower, includeUpper);
+ functionValues.getRangeScorer(context, lowerVal, upperVal, includeLower, includeUpper);
if (scorer.matches(doc)) {
scorer.iterator().advance(doc);
return Explanation.match(
@@ -111,12 +111,23 @@ public class ValueSourceRangeFilter extends Query {
}
@Override
- public Scorer scorer(LeafReaderContext context) throws IOException {
+ public ScorerSupplier scorerSupplier(LeafReaderContext context) throws IOException {
ValueSourceScorer scorer =
valueSource
.getValues(vsContext, context)
- .getRangeScorer(this, context, lowerVal, upperVal, includeLower, includeUpper);
- return new ConstantScoreScorer(this, score(), scoreMode, scorer.twoPhaseIterator());
+ .getRangeScorer(context, lowerVal, upperVal, includeLower, includeUpper);
+ final float score = score();
+ return new ScorerSupplier() {
+ @Override
+ public Scorer get(long leadCost) {
+ return new ConstantScoreScorer(score, scoreMode, scorer.twoPhaseIterator());
+ }
+
+ @Override
+ public long cost() {
+ return scorer.iterator().cost();
+ }
+ };
}
@Override
diff --git a/solr/core/src/java/org/apache/solr/search/grouping/CommandHandler.java b/solr/core/src/java/org/apache/solr/search/grouping/CommandHandler.java
index cd70c53ce33..897d98463ac 100644
--- a/solr/core/src/java/org/apache/solr/search/grouping/CommandHandler.java
+++ b/solr/core/src/java/org/apache/solr/search/grouping/CommandHandler.java
@@ -30,7 +30,6 @@ import org.apache.lucene.search.MultiCollector;
import org.apache.lucene.search.Query;
import org.apache.lucene.search.ScoreMode;
import org.apache.lucene.search.SimpleCollector;
-import org.apache.lucene.search.TimeLimitingCollector;
import org.apache.lucene.search.TotalHitCountCollector;
import org.apache.lucene.search.grouping.AllGroupHeadsCollector;
import org.apache.lucene.search.grouping.TermGroupSelector;
@@ -126,6 +125,7 @@ public class CommandHandler {
private final boolean needDocSet;
private final boolean truncateGroups;
private final boolean includeHitCount;
+ private boolean partialResults = false;
private int totalHitCount;
private DocSet docSet;
@@ -227,6 +227,7 @@ public class CommandHandler {
if (docSet != null) {
queryResult.setDocSet(docSet);
}
+ queryResult.setPartialResults(partialResults);
if (queryResult.isPartialResults()) {
queryResult.setPartialResults(
partialResultsStatus(
@@ -241,14 +242,13 @@ public class CommandHandler {
/**
* Invokes search with the specified filter and collector. If a time limit has been specified then
- * wrap the collector in the TimeLimitingCollector
+ * set timeout on the searcher before search.
*/
private void searchWithTimeLimiter(Query query, ProcessedFilter filter, Collector collector)
throws IOException {
+ // Apply timeout using IndexSearcher.setTimeout if needed
if (queryCommand.getTimeAllowed() > 0) {
- collector =
- new TimeLimitingCollector(
- collector, TimeLimitingCollector.getGlobalCounter(), queryCommand.getTimeAllowed());
+ searcher.setTimeout(SolrIndexSearcher.QueryLimitsTimeout.INSTANCE);
}
TotalHitCountCollector hitCountCollector = new TotalHitCountCollector();
@@ -265,8 +265,14 @@ public class CommandHandler {
try {
searcher.search(query, collector);
- } catch (TimeLimitingCollector.TimeExceededException
- | ExitableDirectoryReader.ExitingReaderException x) {
+
+ // Check for timeout after search
+ if (queryCommand.getTimeAllowed() > 0 && searcher.timedOut()) {
+ partialResults = true;
+ log.warn("Query timed out: [{}]", query);
+ }
+ } catch (ExitableDirectoryReader.ExitingReaderException x) {
+ partialResults = true;
log.warn("Query: {}; ", query, x);
}
diff --git a/solr/core/src/java/org/apache/solr/search/grouping/distributed/command/GroupConverter.java b/solr/core/src/java/org/apache/solr/search/grouping/distributed/command/GroupConverter.java
index 5d81412df38..82dafb09170 100644
--- a/solr/core/src/java/org/apache/solr/search/grouping/distributed/command/GroupConverter.java
+++ b/solr/core/src/java/org/apache/solr/search/grouping/distributed/command/GroupConverter.java
@@ -150,22 +150,22 @@ class GroupConverter {
for (int i = 0; i < values.groups.length; i++) {
GroupDocs<MutableValue> original = values.groups[i];
final BytesRef groupValue;
- if (original.groupValue.exists) {
+ if (original.groupValue().exists) {
BytesRefBuilder binary = new BytesRefBuilder();
fieldType.readableToIndexed(
- Utils.OBJECT_TO_STRING.apply(original.groupValue.toObject()), binary);
+ Utils.OBJECT_TO_STRING.apply(original.groupValue().toObject()), binary);
groupValue = binary.get();
} else {
groupValue = null;
}
groupDocs[i] =
new GroupDocs<>(
- original.score,
- original.maxScore,
- original.totalHits,
- original.scoreDocs,
+ original.score(),
+ original.maxScore(),
+ original.totalHits(),
+ original.scoreDocs(),
groupValue,
- original.groupSortValues);
+ original.groupSortValues());
}
return new TopGroups<>(
diff --git a/solr/core/src/java/org/apache/solr/search/grouping/distributed/command/QueryCommand.java b/solr/core/src/java/org/apache/solr/search/grouping/distributed/command/QueryCommand.java
index 6eaf43834ce..0759780e4d9 100644
--- a/solr/core/src/java/org/apache/solr/search/grouping/distributed/command/QueryCommand.java
+++ b/solr/core/src/java/org/apache/solr/search/grouping/distributed/command/QueryCommand.java
@@ -27,7 +27,8 @@ import org.apache.lucene.search.Sort;
import org.apache.lucene.search.TopDocs;
import org.apache.lucene.search.TopDocsCollector;
import org.apache.lucene.search.TopFieldCollector;
-import org.apache.lucene.search.TopScoreDocCollector;
+import org.apache.lucene.search.TopFieldCollectorManager;
+import org.apache.lucene.search.TopScoreDocCollectorManager;
import org.apache.solr.request.SolrQueryRequest;
import org.apache.solr.search.DocSet;
import org.apache.solr.search.MaxScoreCollector;
@@ -166,9 +167,11 @@ public class QueryCommand implements Command<QueryCommandResult> {
Collector subCollector;
if (sort == null || sort.equals(Sort.RELEVANCE)) {
subCollector =
- topDocsCollector = TopScoreDocCollector.create(docsToCollect, Integer.MAX_VALUE);
+ topDocsCollector =
+ new TopScoreDocCollectorManager(docsToCollect, Integer.MAX_VALUE).newCollector();
} else {
- topDocsCollector = TopFieldCollector.create(sort, docsToCollect, Integer.MAX_VALUE);
+ topDocsCollector =
+ new TopFieldCollectorManager(sort, docsToCollect, Integer.MAX_VALUE).newCollector();
if (needScores) {
maxScoreCollector = new MaxScoreCollector();
subCollector = MultiCollector.wrap(topDocsCollector, maxScoreCollector);
diff --git a/solr/core/src/java/org/apache/solr/search/grouping/distributed/command/TopGroupsFieldCommand.java b/solr/core/src/java/org/apache/solr/search/grouping/distributed/command/TopGroupsFieldCommand.java
index 8f9f895a5c4..a86f0ebae43 100644
--- a/solr/core/src/java/org/apache/solr/search/grouping/distributed/command/TopGroupsFieldCommand.java
+++ b/solr/core/src/java/org/apache/solr/search/grouping/distributed/command/TopGroupsFieldCommand.java
@@ -201,7 +201,7 @@ public class TopGroupsFieldCommand implements Command<TopGroups<BytesRef>> {
}
if (needScores) {
for (GroupDocs<?> group : topGroups.groups) {
- TopFieldCollector.populateScores(group.scoreDocs, searcher, query);
+ TopFieldCollector.populateScores(group.scoreDocs(), searcher, query);
}
}
}
diff --git a/solr/core/src/java/org/apache/solr/search/grouping/distributed/requestfactory/StoredFieldsShardRequestFactory.java b/solr/core/src/java/org/apache/solr/search/grouping/distributed/requestfactory/StoredFieldsShardRequestFactory.java
index d9307a4befa..14e12a02c89 100644
--- a/solr/core/src/java/org/apache/solr/search/grouping/distributed/requestfactory/StoredFieldsShardRequestFactory.java
+++ b/solr/core/src/java/org/apache/solr/search/grouping/distributed/requestfactory/StoredFieldsShardRequestFactory.java
@@ -46,7 +46,7 @@ public class StoredFieldsShardRequestFactory implements ShardRequestFactory {
HashMap<String, Set<ShardDoc>> shardMap = new HashMap<>();
for (TopGroups<BytesRef> topGroups : rb.mergedTopGroups.values()) {
for (GroupDocs<BytesRef> group : topGroups.groups) {
- mapShardToDocs(shardMap, group.scoreDocs);
+ mapShardToDocs(shardMap, group.scoreDocs());
}
}
diff --git a/solr/core/src/java/org/apache/solr/search/grouping/distributed/responseprocessor/TopGroupsShardResponseProcessor.java b/solr/core/src/java/org/apache/solr/search/grouping/distributed/responseprocessor/TopGroupsShardResponseProcessor.java
index 206fd982964..95d584db1c8 100644
--- a/solr/core/src/java/org/apache/solr/search/grouping/distributed/responseprocessor/TopGroupsShardResponseProcessor.java
+++ b/solr/core/src/java/org/apache/solr/search/grouping/distributed/responseprocessor/TopGroupsShardResponseProcessor.java
@@ -212,7 +212,7 @@ public class TopGroupsShardResponseProcessor implements ShardResponseProcessor {
final TopDocs mergedTopDocs;
if (withinGroupSort.equals(Sort.RELEVANCE)) {
- mergedTopDocs = TopDocs.merge(start, topN, topDocs.toArray(new TopDocs[0]));
+ mergedTopDocs = TopDocs.merge(start, topN, topDocs.toArray(new TopDocs[0]), null);
} else {
mergedTopDocs =
TopDocs.merge(withinGroupSort, start, topN, topDocs.toArray(new TopFieldDocs[0]));
@@ -233,7 +233,7 @@ public class TopGroupsShardResponseProcessor implements ShardResponseProcessor {
int i = 0;
for (TopGroups<BytesRef> topGroups : rb.mergedTopGroups.values()) {
for (GroupDocs<BytesRef> group : topGroups.groups) {
- for (ScoreDoc scoreDoc : group.scoreDocs) {
+ for (ScoreDoc scoreDoc : group.scoreDocs()) {
ShardDoc solrDoc = (ShardDoc) scoreDoc;
// Include the first if there are duplicate IDs
if (!resultIds.containsKey(solrDoc.id)) {
diff --git a/solr/core/src/java/org/apache/solr/search/grouping/distributed/shardresultserializer/TopGroupsResultTransformer.java b/solr/core/src/java/org/apache/solr/search/grouping/distributed/shardresultserializer/TopGroupsResultTransformer.java
index a066f7d44a7..060fc78ab8a 100644
--- a/solr/core/src/java/org/apache/solr/search/grouping/distributed/shardresultserializer/TopGroupsResultTransformer.java
+++ b/solr/core/src/java/org/apache/solr/search/grouping/distributed/shardresultserializer/TopGroupsResultTransformer.java
@@ -230,24 +230,24 @@ public class TopGroupsResultTransformer
SchemaField uniqueField = schema.getUniqueKeyField();
for (GroupDocs<BytesRef> searchGroup : data.groups) {
NamedList<Object> groupResult = new NamedList<>();
- assert searchGroup.totalHits.relation == TotalHits.Relation.EQUAL_TO;
- groupResult.add("totalHits", searchGroup.totalHits.value);
- if (!Float.isNaN(searchGroup.maxScore)) {
- groupResult.add("maxScore", searchGroup.maxScore);
+ assert searchGroup.totalHits().relation() == TotalHits.Relation.EQUAL_TO;
+ groupResult.add("totalHits", searchGroup.totalHits().value());
+ if (!Float.isNaN(searchGroup.maxScore())) {
+ groupResult.add("maxScore", searchGroup.maxScore());
}
SolrDocumentFetcher docFetcher = rb.req.getSearcher().getDocFetcher();
List<NamedList<Object>> documents = new ArrayList<>();
- for (int i = 0; i < searchGroup.scoreDocs.length; i++) {
+ for (int i = 0; i < searchGroup.scoreDocs().length; i++) {
NamedList<Object> document = new NamedList<>();
documents.add(document);
- Document doc = retrieveDocument(uniqueField, searchGroup.scoreDocs[i].doc, docFetcher);
+ Document doc = retrieveDocument(uniqueField, searchGroup.scoreDocs()[i].doc, docFetcher);
document.add(ID, uniqueField.getType().toExternal(doc.getField(uniqueField.getName())));
- if (!Float.isNaN(searchGroup.scoreDocs[i].score)) {
- document.add("score", searchGroup.scoreDocs[i].score);
+ if (!Float.isNaN(searchGroup.scoreDocs()[i].score)) {
+ document.add("score", searchGroup.scoreDocs()[i].score);
}
- if (!(searchGroup.scoreDocs[i] instanceof FieldDoc fieldDoc)) {
+ if (!(searchGroup.scoreDocs()[i] instanceof FieldDoc fieldDoc)) {
continue; // thus don't add sortValues below
}
@@ -271,10 +271,10 @@ public class TopGroupsResultTransformer
}
groupResult.add("documents", documents);
String groupValue =
- searchGroup.groupValue != null
+ searchGroup.groupValue() != null
? groupField
.getType()
- .indexedToReadable(searchGroup.groupValue, new CharsRefBuilder())
+ .indexedToReadable(searchGroup.groupValue(), new CharsRefBuilder())
.toString()
: null;
result.add(groupValue, groupResult);
@@ -287,8 +287,8 @@ public class TopGroupsResultTransformer
NamedList<Object> queryResult = new NamedList<>();
queryResult.add("matches", result.getMatches());
TopDocs topDocs = result.getTopDocs();
- assert topDocs.totalHits.relation == TotalHits.Relation.EQUAL_TO;
- queryResult.add("totalHits", topDocs.totalHits.value);
+ assert topDocs.totalHits.relation() == TotalHits.Relation.EQUAL_TO;
+ queryResult.add("totalHits", topDocs.totalHits.value());
// debug: assert !Float.isNaN(result.getTopDocs().getMaxScore()) ==
// rb.getGroupingSpec().isNeedScore();
if (!Float.isNaN(result.getMaxScore())) {
diff --git a/solr/core/src/java/org/apache/solr/search/grouping/endresulttransformer/GroupedEndResultTransformer.java b/solr/core/src/java/org/apache/solr/search/grouping/endresulttransformer/GroupedEndResultTransformer.java
index 78244263855..e004cc30014 100644
--- a/solr/core/src/java/org/apache/solr/search/grouping/endresulttransformer/GroupedEndResultTransformer.java
+++ b/solr/core/src/java/org/apache/solr/search/grouping/endresulttransformer/GroupedEndResultTransformer.java
@@ -73,16 +73,17 @@ public class GroupedEndResultTransformer implements EndResultTransformer {
FieldType groupFieldType = groupField.getType();
for (GroupDocs<BytesRef> group : topGroups.groups) {
SimpleOrderedMap<Object> groupResult = new SimpleOrderedMap<>();
- if (group.groupValue != null) {
+ if (group.groupValue() != null) {
// use createFields so that fields having doc values are also supported
- List<IndexableField> fields = groupField.createFields(group.groupValue.utf8ToString());
+ List<IndexableField> fields =
+ groupField.createFields(group.groupValue().utf8ToString());
if (fields != null && !fields.isEmpty()) {
groupResult.add("groupValue", groupFieldType.toObject(fields.get(0)));
} else {
throw new SolrException(
ErrorCode.INVALID_STATE,
"Couldn't create schema field for grouping, group value: "
- + group.groupValue.utf8ToString()
+ + group.groupValue().utf8ToString()
+ ", field: "
+ groupField);
}
@@ -90,13 +91,13 @@ public class GroupedEndResultTransformer implements EndResultTransformer {
groupResult.add("groupValue", null);
}
SolrDocumentList docList = new SolrDocumentList();
- assert group.totalHits.relation == TotalHits.Relation.EQUAL_TO;
- docList.setNumFound(group.totalHits.value);
- if (!Float.isNaN(group.maxScore)) {
- docList.setMaxScore(group.maxScore);
+ assert group.totalHits().relation() == TotalHits.Relation.EQUAL_TO;
+ docList.setNumFound(group.totalHits().value());
+ if (!Float.isNaN(group.maxScore())) {
+ docList.setMaxScore(group.maxScore());
}
docList.setStart(withinGroupSortSpec.getOffset());
- retrieveAndAdd(docList, solrDocumentSource, group.scoreDocs);
+ retrieveAndAdd(docList, solrDocumentSource, group.scoreDocs());
groupResult.add("doclist", docList);
groups.add(groupResult);
}
@@ -108,8 +109,8 @@ public class GroupedEndResultTransformer implements EndResultTransformer {
command.add("matches", queryCommandResult.getMatches());
SolrDocumentList docList = new SolrDocumentList();
TopDocs topDocs = queryCommandResult.getTopDocs();
- assert topDocs.totalHits.relation == TotalHits.Relation.EQUAL_TO;
- docList.setNumFound(topDocs.totalHits.value);
+ assert topDocs.totalHits.relation() == TotalHits.Relation.EQUAL_TO;
+ docList.setNumFound(topDocs.totalHits.value());
if (!Float.isNaN(queryCommandResult.getMaxScore())) {
docList.setMaxScore(queryCommandResult.getMaxScore());
}
diff --git a/solr/core/src/java/org/apache/solr/search/grouping/endresulttransformer/MainEndResultTransformer.java b/solr/core/src/java/org/apache/solr/search/grouping/endresulttransformer/MainEndResultTransformer.java
index 94c475237bf..02c5ab87043 100644
--- a/solr/core/src/java/org/apache/solr/search/grouping/endresulttransformer/MainEndResultTransformer.java
+++ b/solr/core/src/java/org/apache/solr/search/grouping/endresulttransformer/MainEndResultTransformer.java
@@ -58,7 +58,7 @@ public class MainEndResultTransformer implements EndResultTransformer {
float maxScore = Float.NEGATIVE_INFINITY;
for (GroupDocs<BytesRef> group : topGroups.groups) {
- for (ScoreDoc scoreDoc : group.scoreDocs) {
+ for (ScoreDoc scoreDoc : group.scoreDocs()) {
if (maxScore < scoreDoc.score) {
maxScore = scoreDoc.score;
}
@@ -77,7 +77,7 @@ public class MainEndResultTransformer implements EndResultTransformer {
TopDocs topDocs = queryCommandResult.getTopDocs();
docList.setStart(rb.getGroupingSpec().getGroupSortSpec().getOffset());
- docList.setNumFound(topDocs.totalHits.value);
+ docList.setNumFound(topDocs.totalHits.value());
if (!Float.isNaN(queryCommandResult.getMaxScore())) {
docList.setMaxScore(queryCommandResult.getMaxScore());
}
diff --git a/solr/core/src/java/org/apache/solr/search/grouping/endresulttransformer/SimpleEndResultTransformer.java b/solr/core/src/java/org/apache/solr/search/grouping/endresulttransformer/SimpleEndResultTransformer.java
index 171ee751f18..f964e04adf2 100644
--- a/solr/core/src/java/org/apache/solr/search/grouping/endresulttransformer/SimpleEndResultTransformer.java
+++ b/solr/core/src/java/org/apache/solr/search/grouping/endresulttransformer/SimpleEndResultTransformer.java
@@ -55,7 +55,7 @@ public class SimpleEndResultTransformer implements EndResultTransformer {
float maxScore = Float.NEGATIVE_INFINITY;
for (GroupDocs<BytesRef> group : topGroups.groups) {
- for (ScoreDoc scoreDoc : group.scoreDocs) {
+ for (ScoreDoc scoreDoc : group.scoreDocs()) {
if (maxScore < scoreDoc.score) {
maxScore = scoreDoc.score;
}
@@ -77,7 +77,7 @@ public class SimpleEndResultTransformer implements EndResultTransformer {
TopDocs topDocs = queryCommandResult.getTopDocs();
SolrDocumentList docList = new SolrDocumentList();
docList.setStart(rb.getGroupingSpec().getGroupSortSpec().getOffset());
- docList.setNumFound(topDocs.totalHits.value);
+ docList.setNumFound(topDocs.totalHits.value());
if (!Float.isNaN(queryCommandResult.getMaxScore())) {
docList.setMaxScore(queryCommandResult.getMaxScore());
diff --git a/solr/core/src/java/org/apache/solr/search/join/BlockJoinParentQParser.java b/solr/core/src/java/org/apache/solr/search/join/BlockJoinParentQParser.java
index 67a38d0fc57..22178b0a265 100644
--- a/solr/core/src/java/org/apache/solr/search/join/BlockJoinParentQParser.java
+++ b/solr/core/src/java/org/apache/solr/search/join/BlockJoinParentQParser.java
@@ -27,6 +27,7 @@ import org.apache.lucene.search.IndexSearcher;
import org.apache.lucene.search.Query;
import org.apache.lucene.search.QueryVisitor;
import org.apache.lucene.search.Scorer;
+import org.apache.lucene.search.ScorerSupplier;
import org.apache.lucene.search.Weight;
import org.apache.lucene.search.join.BitSetProducer;
import org.apache.lucene.search.join.QueryBitSetProducer;
@@ -155,13 +156,24 @@ public class BlockJoinParentQParser extends FiltersQParser {
throws IOException {
return new ConstantScoreWeight(BitSetProducerQuery.this, boost) {
@Override
- public Scorer scorer(LeafReaderContext context) throws IOException {
+ public ScorerSupplier scorerSupplier(LeafReaderContext context) throws IOException {
BitSet bitSet = bitSetProducer.getBitSet(context);
if (bitSet == null) {
return null;
}
DocIdSetIterator disi = new BitSetIterator(bitSet, bitSet.approximateCardinality());
- return new ConstantScoreScorer(this, boost, scoreMode, disi);
+ final float score = score();
+ return new ScorerSupplier() {
+ @Override
+ public Scorer get(long leadCost) {
+ return new ConstantScoreScorer(score, scoreMode, disi);
+ }
+
+ @Override
+ public long cost() {
+ return disi.cost();
+ }
+ };
}
@Override
diff --git a/solr/core/src/java/org/apache/solr/search/join/CrossCollectionJoinQuery.java b/solr/core/src/java/org/apache/solr/search/join/CrossCollectionJoinQuery.java
index 619025800ac..37dabf7216e 100644
--- a/solr/core/src/java/org/apache/solr/search/join/CrossCollectionJoinQuery.java
+++ b/solr/core/src/java/org/apache/solr/search/join/CrossCollectionJoinQuery.java
@@ -34,6 +34,7 @@ import org.apache.lucene.search.Query;
import org.apache.lucene.search.QueryVisitor;
import org.apache.lucene.search.ScoreMode;
import org.apache.lucene.search.Scorer;
+import org.apache.lucene.search.ScorerSupplier;
import org.apache.lucene.search.Weight;
import org.apache.lucene.util.BytesRefBuilder;
import org.apache.lucene.util.FixedBitSet;
@@ -324,16 +325,28 @@ public class CrossCollectionJoinQuery extends Query implements SolrSearcherRequi
}
@Override
- public Scorer scorer(LeafReaderContext context) throws IOException {
+ public ScorerSupplier scorerSupplier(LeafReaderContext context) throws IOException {
if (docs == null) {
docs = getDocSet();
}
+ // Check if this context has any matching documents before creating ScorerSupplier
DocIdSetIterator readerSetIterator = docs.iterator(context);
if (readerSetIterator == null) {
return null;
}
- return new ConstantScoreScorer(this, score(), scoreMode, readerSetIterator);
+
+ return new ScorerSupplier() {
+ @Override
+ public Scorer get(long leadCost) throws IOException {
+ return new ConstantScoreScorer(score(), scoreMode, readerSetIterator);
+ }
+
+ @Override
+ public long cost() {
+ return docs.size();
+ }
+ };
}
@Override
diff --git a/solr/core/src/java/org/apache/solr/search/join/GraphEdgeCollector.java b/solr/core/src/java/org/apache/solr/search/join/GraphEdgeCollector.java
index c38c3d00b2e..5679f1f6828 100644
--- a/solr/core/src/java/org/apache/solr/search/join/GraphEdgeCollector.java
+++ b/solr/core/src/java/org/apache/solr/search/join/GraphEdgeCollector.java
@@ -35,8 +35,8 @@ import org.apache.lucene.util.BitSet;
import org.apache.lucene.util.BytesRef;
import org.apache.lucene.util.BytesRefHash;
import org.apache.lucene.util.FixedBitSet;
+import org.apache.lucene.util.automaton.Automata;
import org.apache.lucene.util.automaton.Automaton;
-import org.apache.lucene.util.automaton.DaciukMihovAutomatonBuilder;
import org.apache.solr.schema.SchemaField;
import org.apache.solr.search.DocSet;
@@ -146,8 +146,8 @@ abstract class GraphEdgeCollector extends SimpleCollector implements Collector {
}
if (doc == docTermOrds.docID()) {
BytesRef edgeValue = new BytesRef();
- long ord;
- while ((ord = docTermOrds.nextOrd()) != SortedSetDocValues.NO_MORE_ORDS) {
+ for (int i = 0; i < docTermOrds.docValueCount(); i++) {
+ long ord = docTermOrds.nextOrd();
edgeValue = docTermOrds.lookupOrd(ord);
// add the edge id to the collector terms.
collectorTerms.add(edgeValue);
@@ -196,7 +196,7 @@ abstract class GraphEdgeCollector extends SimpleCollector implements Collector {
termBytesHash.get(i, ref);
terms.add(ref);
}
- final Automaton a = DaciukMihovAutomatonBuilder.build(terms);
+ final Automaton a = Automata.makeStringUnion(terms);
return a;
}
}
diff --git a/solr/core/src/java/org/apache/solr/search/join/GraphQuery.java b/solr/core/src/java/org/apache/solr/search/join/GraphQuery.java
index 051c3f639f5..eb5cfc15bce 100644
--- a/solr/core/src/java/org/apache/solr/search/join/GraphQuery.java
+++ b/solr/core/src/java/org/apache/solr/search/join/GraphQuery.java
@@ -28,20 +28,23 @@ import org.apache.lucene.search.BooleanClause.Occur;
import org.apache.lucene.search.BooleanQuery;
import org.apache.lucene.search.DocIdSet;
import org.apache.lucene.search.DocIdSetIterator;
-import org.apache.lucene.search.DocValuesFieldExistsQuery;
import org.apache.lucene.search.Explanation;
+import org.apache.lucene.search.FieldExistsQuery;
import org.apache.lucene.search.IndexSearcher;
import org.apache.lucene.search.Query;
import org.apache.lucene.search.QueryVisitor;
import org.apache.lucene.search.ScoreMode;
import org.apache.lucene.search.Scorer;
+import org.apache.lucene.search.ScorerSupplier;
import org.apache.lucene.search.Weight;
import org.apache.lucene.search.WildcardQuery;
+import org.apache.lucene.search.MultiTermQuery;
import org.apache.lucene.util.BytesRef;
import org.apache.lucene.util.BytesRefHash;
import org.apache.lucene.util.FixedBitSet;
+import org.apache.lucene.util.automaton.Automata;
import org.apache.lucene.util.automaton.Automaton;
-import org.apache.lucene.util.automaton.DaciukMihovAutomatonBuilder;
+import org.apache.lucene.util.automaton.Operations;
import org.apache.solr.schema.SchemaField;
import org.apache.solr.search.BitDocSet;
import org.apache.solr.search.DocSet;
@@ -257,8 +260,11 @@ public class GraphQuery extends Query implements SolrSearcherRequirer {
BooleanQuery.Builder leafNodeQuery = new BooleanQuery.Builder();
Query edgeQuery =
collectSchemaField.hasDocValues()
- ? new DocValuesFieldExistsQuery(field)
- : new WildcardQuery(new Term(field, "*"));
+ ? new FieldExistsQuery(field)
+ : new WildcardQuery(
+ new Term(field, "*"),
+ Operations.DEFAULT_DETERMINIZE_WORK_LIMIT,
+ MultiTermQuery.CONSTANT_SCORE_REWRITE);
leafNodeQuery.add(edgeQuery, Occur.MUST_NOT);
DocSet leafNodes = fromSearcher.getDocSet(leafNodeQuery.build());
return leafNodes;
@@ -273,19 +279,29 @@ public class GraphQuery extends Query implements SolrSearcherRequirer {
termBytesHash.get(i, ref);
terms.add(ref);
}
- final Automaton a = DaciukMihovAutomatonBuilder.build(terms);
+ final Automaton a = Automata.makeStringUnion(terms);
return a;
}
@Override
- public Scorer scorer(LeafReaderContext context) throws IOException {
- if (resultSet == null) {
- resultSet = getDocSet();
- }
- DocIdSetIterator disi = resultSet.iterator(context);
- // create a scrorer on the result set, if results from right query are empty, use empty
- // iterator.
- return new GraphScorer(this, disi == null ? DocIdSetIterator.empty() : disi, 1);
+ public ScorerSupplier scorerSupplier(LeafReaderContext context) throws IOException {
+ return new ScorerSupplier() {
+ @Override
+ public Scorer get(long leadCost) throws IOException {
+ if (resultSet == null) {
+ resultSet = getDocSet();
+ }
+ DocIdSetIterator disi = resultSet.iterator(context);
+ // create a scrorer on the result set, if results from right query are empty, use empty
+ // iterator.
+ return new GraphScorer(disi == null ? DocIdSetIterator.empty() : disi, 1);
+ }
+
+ @Override
+ public long cost() {
+ return resultSet != null ? resultSet.size() : 0;
+ }
+ };
}
@Override
@@ -300,8 +316,8 @@ public class GraphQuery extends Query implements SolrSearcherRequirer {
final float score;
// graph query scorer constructor with iterator
- public GraphScorer(Weight w, DocIdSetIterator iter, float score) throws IOException {
- super(w);
+ public GraphScorer(DocIdSetIterator iter, float score) throws IOException {
+ super();
this.iter = iter == null ? DocIdSet.EMPTY.iterator() : iter;
this.score = score;
}
diff --git a/solr/core/src/java/org/apache/solr/search/join/HashRangeQuery.java b/solr/core/src/java/org/apache/solr/search/join/HashRangeQuery.java
index cdead70a3a9..1b99193d276 100644
--- a/solr/core/src/java/org/apache/solr/search/join/HashRangeQuery.java
+++ b/solr/core/src/java/org/apache/solr/search/join/HashRangeQuery.java
@@ -32,6 +32,7 @@ import org.apache.lucene.search.Query;
import org.apache.lucene.search.QueryVisitor;
import org.apache.lucene.search.ScoreMode;
import org.apache.lucene.search.Scorer;
+import org.apache.lucene.search.ScorerSupplier;
import org.apache.lucene.search.TwoPhaseIterator;
import org.apache.lucene.search.Weight;
import org.apache.lucene.util.BytesRef;
@@ -70,25 +71,35 @@ public class HashRangeQuery extends Query {
}
@Override
- public Scorer scorer(LeafReaderContext context) throws IOException {
- SortedDocValues docValues = context.reader().getSortedDocValues(field);
- int[] cache = getCache(context);
-
- TwoPhaseIterator iterator =
- new TwoPhaseIterator(docValues) {
- @Override
- public boolean matches() throws IOException {
- int hash = cache != null ? cache[docValues.docID()] : hash(docValues);
- return hash >= lower && hash <= upper;
- }
-
- @Override
- public float matchCost() {
- return cache != null ? 2 : 100;
- }
- };
-
- return new ConstantScoreScorer(this, boost, scoreMode, iterator);
+ public ScorerSupplier scorerSupplier(LeafReaderContext context) throws IOException {
+ return new ScorerSupplier() {
+ @Override
+ public Scorer get(long leadCost) throws IOException {
+ SortedDocValues docValues = context.reader().getSortedDocValues(field);
+ int[] cache = getCache(context);
+
+ TwoPhaseIterator iterator =
+ new TwoPhaseIterator(docValues) {
+ @Override
+ public boolean matches() throws IOException {
+ int hash = cache != null ? cache[docValues.docID()] : hash(docValues);
+ return hash >= lower && hash <= upper;
+ }
+
+ @Override
+ public float matchCost() {
+ return cache != null ? 2 : 100;
+ }
+ };
+
+ return new ConstantScoreScorer(boost, scoreMode, iterator);
+ }
+
+ @Override
+ public long cost() {
+ return context.reader().maxDoc();
+ }
+ };
}
private int[] getCache(LeafReaderContext context) throws IOException {
diff --git a/solr/core/src/java/org/apache/solr/search/join/MultiValueTermOrdinalCollector.java b/solr/core/src/java/org/apache/solr/search/join/MultiValueTermOrdinalCollector.java
index 35caf7d8ed0..c77fbfa10f6 100644
--- a/solr/core/src/java/org/apache/solr/search/join/MultiValueTermOrdinalCollector.java
+++ b/solr/core/src/java/org/apache/solr/search/join/MultiValueTermOrdinalCollector.java
@@ -55,8 +55,8 @@ public class MultiValueTermOrdinalCollector extends SimpleCollector {
final int globalDoc = docBase + doc;
if (topLevelDocValues.advanceExact(globalDoc)) {
- long ord = SortedSetDocValues.NO_MORE_ORDS;
- while ((ord = topLevelDocValues.nextOrd()) != SortedSetDocValues.NO_MORE_ORDS) {
+ for (int i = 0; i < topLevelDocValues.docValueCount(); i++) {
+ long ord = topLevelDocValues.nextOrd();
topLevelDocValuesBitSet.set(ord);
}
}
diff --git a/solr/core/src/java/org/apache/solr/search/join/ScoreJoinQParserPlugin.java b/solr/core/src/java/org/apache/solr/search/join/ScoreJoinQParserPlugin.java
index d61903440af..b8f3de40f23 100644
--- a/solr/core/src/java/org/apache/solr/search/join/ScoreJoinQParserPlugin.java
+++ b/solr/core/src/java/org/apache/solr/search/join/ScoreJoinQParserPlugin.java
@@ -138,7 +138,7 @@ public class ScoreJoinQParserPlugin extends QParserPlugin {
fromCore.close();
fromHolder.decref();
}
- return joinQuery.rewrite(searcher.getIndexReader()).createWeight(searcher, scoreMode, boost);
+ return joinQuery.rewrite(searcher).createWeight(searcher, scoreMode, boost);
}
@Override
@@ -192,7 +192,7 @@ public class ScoreJoinQParserPlugin extends QParserPlugin {
final Query jq =
JoinUtil.createJoinQuery(
fromField, true, toField, fromQuery, info.getReq().getSearcher(), this.scoreMode);
- return jq.rewrite(searcher.getIndexReader()).createWeight(searcher, scoreMode, boost);
+ return jq.rewrite(searcher).createWeight(searcher, scoreMode, boost);
}
@Override
diff --git a/solr/core/src/java/org/apache/solr/search/mlt/AbstractMLTQParser.java b/solr/core/src/java/org/apache/solr/search/mlt/AbstractMLTQParser.java
index 19aded8a79c..7eb7a1e26d9 100644
--- a/solr/core/src/java/org/apache/solr/search/mlt/AbstractMLTQParser.java
+++ b/solr/core/src/java/org/apache/solr/search/mlt/AbstractMLTQParser.java
@@ -136,18 +136,15 @@ abstract class AbstractMLTQParser extends QParser {
newQ.setMinimumNumberShouldMatch(rawMLTQuery.getMinimumNumberShouldMatch());
for (BooleanClause clause : rawMLTQuery) {
- Query q = clause.getQuery();
+ Query q = clause.query();
float originalBoost = 1f;
if (q instanceof BoostQuery bq) {
q = bq.getQuery();
originalBoost = bq.getBoost();
}
Float fieldBoost = boostFields.get(((TermQuery) q).getTerm().field());
- q =
- ((fieldBoost != null)
- ? new BoostQuery(q, fieldBoost * originalBoost)
- : clause.getQuery());
- newQ.add(q, clause.getOccur());
+ q = ((fieldBoost != null) ? new BoostQuery(q, fieldBoost * originalBoost) : clause.query());
+ newQ.add(q, clause.occur());
}
return QueryUtils.build(newQ, this);
}
diff --git a/solr/core/src/java/org/apache/solr/search/mlt/SimpleMLTQParser.java b/solr/core/src/java/org/apache/solr/search/mlt/SimpleMLTQParser.java
index 083211f144a..d02e8afe7a3 100644
--- a/solr/core/src/java/org/apache/solr/search/mlt/SimpleMLTQParser.java
+++ b/solr/core/src/java/org/apache/solr/search/mlt/SimpleMLTQParser.java
@@ -47,7 +47,7 @@ public class SimpleMLTQParser extends AbstractMLTQParser {
try {
TopDocs td = searcher.search(docIdQuery, 2);
- if (td.totalHits.value != 1)
+ if (td.totalHits.value() != 1)
throw new SolrException(
SolrException.ErrorCode.BAD_REQUEST,
"Error completing MLT request. Could not fetch "
diff --git a/solr/core/src/java/org/apache/solr/servlet/ServletUtils.java b/solr/core/src/java/org/apache/solr/servlet/ServletUtils.java
index b1d6d7bbac2..8a0fed5b642 100644
--- a/solr/core/src/java/org/apache/solr/servlet/ServletUtils.java
+++ b/solr/core/src/java/org/apache/solr/servlet/ServletUtils.java
@@ -90,10 +90,21 @@ public abstract class ServletUtils {
public void close() {
// even though we skip closes, we let local tests know not to close so that a full
// understanding can take place
- assert !Thread.currentThread()
- .getStackTrace()[2]
- .getClassName()
- .matches("org\\.apache\\.(?:solr|lucene).*")
+ // Allow Lucene's IOUtils.closeWhileHandlingException to close streams (legitimate error
+ // cleanup)
+ StackTraceElement[] stack = Thread.currentThread().getStackTrace();
+ // Look through the stack to find IOUtils.closeWhileHandlingException
+ boolean isLuceneIOUtilsErrorHandling = false;
+ for (int i = 1; i < stack.length && i <= 10; i++) {
+ if (stack[i].getClassName().equals("org.apache.lucene.util.IOUtils")
+ && stack[i].getMethodName().equals("closeWhileHandlingException")) {
+ isLuceneIOUtilsErrorHandling = true;
+ break;
+ }
+ }
+ StackTraceElement caller = stack[2];
+ assert !caller.getClassName().matches("org\\.apache\\.(?:solr|lucene).*")
+ || isLuceneIOUtilsErrorHandling
: CLOSE_STREAM_MSG;
this.stream = ClosedServletInputStream.CLOSED_SERVLET_INPUT_STREAM;
}
@@ -119,10 +130,21 @@ public abstract class ServletUtils {
public void close() {
// even though we skip closes, we let local tests know not to close so that a full
// understanding can take place
- assert !Thread.currentThread()
- .getStackTrace()[2]
- .getClassName()
- .matches("org\\.apache\\.(?:solr|lucene).*")
+ // Allow Lucene's IOUtils.closeWhileHandlingException to close streams (legitimate error
+ // cleanup)
+ StackTraceElement[] stack = Thread.currentThread().getStackTrace();
+ // Look through the stack to find IOUtils.closeWhileHandlingException
+ boolean isLuceneIOUtilsErrorHandling = false;
+ for (int i = 1; i < stack.length && i <= 10; i++) {
+ if (stack[i].getClassName().equals("org.apache.lucene.util.IOUtils")
+ && stack[i].getMethodName().equals("closeWhileHandlingException")) {
+ isLuceneIOUtilsErrorHandling = true;
+ break;
+ }
+ }
+ StackTraceElement caller = stack[2];
+ assert !caller.getClassName().matches("org\\.apache\\.(?:solr|lucene).*")
+ || isLuceneIOUtilsErrorHandling
: CLOSE_STREAM_MSG;
stream = ClosedServletOutputStream.CLOSED_SERVLET_OUTPUT_STREAM;
}
diff --git a/solr/core/src/java/org/apache/solr/servlet/SolrRequestParsers.java b/solr/core/src/java/org/apache/solr/servlet/SolrRequestParsers.java
index 9c32b96135b..3142049cce6 100644
--- a/solr/core/src/java/org/apache/solr/servlet/SolrRequestParsers.java
+++ b/solr/core/src/java/org/apache/solr/servlet/SolrRequestParsers.java
@@ -433,7 +433,7 @@ public class SolrRequestParsers {
currentStream = valueStream;
break;
}
- // fall-through
+ // fall-through
default:
currentStream.write(b);
}
diff --git a/solr/core/src/java/org/apache/solr/spelling/WordBreakSolrSpellChecker.java b/solr/core/src/java/org/apache/solr/spelling/WordBreakSolrSpellChecker.java
index 9086101bf44..5689507c034 100644
--- a/solr/core/src/java/org/apache/solr/spelling/WordBreakSolrSpellChecker.java
+++ b/solr/core/src/java/org/apache/solr/spelling/WordBreakSolrSpellChecker.java
@@ -226,8 +226,8 @@ public class WordBreakSolrSpellChecker extends SolrSpellChecker {
if (combineWords) {
combineSuggestionList = new ArrayList<>(combineSuggestions.length);
for (CombineSuggestion cs : combineSuggestions) {
- int firstTermIndex = cs.originalTermIndexes[0];
- int lastTermIndex = cs.originalTermIndexes[cs.originalTermIndexes.length - 1];
+ int firstTermIndex = cs.originalTermIndexes()[0];
+ int lastTermIndex = cs.originalTermIndexes()[cs.originalTermIndexes().length - 1];
sb.delete(0, sb.length());
for (int i = firstTermIndex; i <= lastTermIndex; i++) {
if (i > firstTermIndex) {
@@ -240,7 +240,8 @@ public class WordBreakSolrSpellChecker extends SolrSpellChecker {
sb.toString(),
tokenArrWithSeparators.get(firstTermIndex).startOffset(),
tokenArrWithSeparators.get(lastTermIndex).endOffset());
- combineSuggestionList.add(new ResultEntry(token, cs.suggestion.string, cs.suggestion.freq));
+ combineSuggestionList.add(
+ new ResultEntry(token, cs.suggestion().string, cs.suggestion().freq));
}
}
diff --git a/solr/core/src/java/org/apache/solr/uninverting/DocTermOrds.java b/solr/core/src/java/org/apache/solr/uninverting/DocTermOrds.java
index 0122057c8b2..0d588e1a6e7 100644
--- a/solr/core/src/java/org/apache/solr/uninverting/DocTermOrds.java
+++ b/solr/core/src/java/org/apache/solr/uninverting/DocTermOrds.java
@@ -799,7 +799,8 @@ public class DocTermOrds implements Accountable {
public long nextOrd() {
while (bufferUpto == bufferLength) {
if (bufferLength < buffer.length) {
- return NO_MORE_ORDS;
+ throw new IllegalStateException(
+ "nextOrd() called more than docValueCount() times for the current document");
} else {
bufferLength = read(buffer);
bufferUpto = 0;
@@ -810,25 +811,42 @@ public class DocTermOrds implements Accountable {
@Override
public int docValueCount() {
- if (arr == null) {
- // This value was inlined, and then read into a single buffer
- return bufferLength;
+ // For Lucene 10 migration (LUCENE-10603): docValueCount() must return exactly
+ // the number of ordinals that can be retrieved by calling nextOrd().
+ // We need to simulate the same buffered reading logic that nextOrd() uses.
+
+ // Save current state
+ int savedTnum = this.tnum;
+ int savedUpto = this.upto;
+ int savedBufferUpto = this.bufferUpto;
+ int savedBufferLength = this.bufferLength;
+
+ // Reset to start of document
+ this.tnum = 0;
+ if ((index[doc] & 0x80000000) != 0) {
+ // a pointer
+ this.upto = index[doc] & 0x7fffffff;
} else {
- // scan logic taken from read()
- int start = index[doc] & 0x7fffffff;
- int cursor = start;
- for (; ; ) {
- int delta = 0;
- for (; ; ) {
- byte b = arr[cursor++];
- delta = (delta << 7) | (b & 0x7f);
- if ((b & 0x80) == 0) break;
- }
- if (delta == 0) break;
- }
+ // inline
+ this.upto = index[doc];
+ }
- return cursor - start - 1;
+ // Count all values by simulating successive read() calls
+ int totalCount = 0;
+ int[] tempBuffer = new int[buffer.length];
+ int readCount;
+ while ((readCount = read(tempBuffer)) == tempBuffer.length) {
+ totalCount += readCount;
}
+ totalCount += readCount; // Add the final partial buffer
+
+ // Restore original state
+ this.tnum = savedTnum;
+ this.upto = savedUpto;
+ this.bufferUpto = savedBufferUpto;
+ this.bufferLength = savedBufferLength;
+
+ return totalCount;
}
/**
diff --git a/solr/core/src/java/org/apache/solr/uninverting/FieldCacheImpl.java b/solr/core/src/java/org/apache/solr/uninverting/FieldCacheImpl.java
index 6f23c14a6d7..f0790d1df28 100644
--- a/solr/core/src/java/org/apache/solr/uninverting/FieldCacheImpl.java
+++ b/solr/core/src/java/org/apache/solr/uninverting/FieldCacheImpl.java
@@ -886,8 +886,11 @@ public class FieldCacheImpl implements FieldCache {
@Override
public BytesRef lookupOrd(int ord) {
- if (ord < 0) {
- throw new IllegalArgumentException("ord must be >=0 (got ord=" + ord + ")");
+ // ord=-1 represents missing values, ord >= numOrd is out of bounds
+ // ord=0 is a valid ordinal (the first term)
+ if (ord < 0 || ord >= numOrd) {
+ // This should never happen in normal operation
+ throw new IllegalArgumentException("Invalid ord: " + ord + " (numOrd=" + numOrd + ")");
}
bytes.fill(term, termOrdToBytesOffset.get(ord));
return term;
@@ -1097,13 +1100,9 @@ public class FieldCacheImpl implements FieldCache {
}
@Override
- public BytesRef binaryValue() {
- final long pointer = docToOffset.get(docID);
- if (pointer == 0) {
- term.length = 0;
- } else {
- bytes.fill(term, pointer);
- }
+ public BytesRef binaryValue() throws IOException {
+ final int offset = (int) docToOffset.get(docID);
+ bytes.fill(term, offset);
return term;
}
};
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 174095a2ea4..c0f4f209921 100644
--- a/solr/core/src/java/org/apache/solr/uninverting/UninvertingReader.java
+++ b/solr/core/src/java/org/apache/solr/uninverting/UninvertingReader.java
@@ -27,6 +27,7 @@ import org.apache.lucene.document.SortedSetDocValuesField;
import org.apache.lucene.document.StringField;
import org.apache.lucene.index.BinaryDocValues;
import org.apache.lucene.index.DirectoryReader;
+import org.apache.lucene.index.DocValuesSkipIndexType;
import org.apache.lucene.index.DocValuesType;
import org.apache.lucene.index.FieldInfo;
import org.apache.lucene.index.FieldInfos;
@@ -285,11 +286,12 @@ public class UninvertingReader extends FilterLeafReader {
new FieldInfo(
fi.name,
fi.number,
- fi.hasVectors(),
+ fi.hasTermVectors(),
fi.omitsNorms(),
fi.hasPayloads(),
fi.getIndexOptions(),
type,
+ DocValuesSkipIndexType.NONE,
fi.getDocValuesGen(),
fi.attributes(),
fi.getPointDimensionCount(),
diff --git a/solr/core/src/java/org/apache/solr/update/DeleteByQueryWrapper.java b/solr/core/src/java/org/apache/solr/update/DeleteByQueryWrapper.java
index ce6489f9083..8af66eb6f59 100644
--- a/solr/core/src/java/org/apache/solr/update/DeleteByQueryWrapper.java
+++ b/solr/core/src/java/org/apache/solr/update/DeleteByQueryWrapper.java
@@ -18,7 +18,6 @@ package org.apache.solr.update;
import java.io.IOException;
import java.util.Objects;
-import org.apache.lucene.index.IndexReader;
import org.apache.lucene.index.LeafReader;
import org.apache.lucene.index.LeafReaderContext;
import org.apache.lucene.search.Explanation;
@@ -27,6 +26,7 @@ import org.apache.lucene.search.Query;
import org.apache.lucene.search.QueryVisitor;
import org.apache.lucene.search.ScoreMode;
import org.apache.lucene.search.Scorer;
+import org.apache.lucene.search.ScorerSupplier;
import org.apache.lucene.search.Weight;
import org.apache.solr.schema.IndexSchema;
import org.apache.solr.uninverting.UninvertingReader;
@@ -54,12 +54,12 @@ final class DeleteByQueryWrapper extends Query {
// we try to be well-behaved, but we are not (and IW's applyQueryDeletes isn't much better...)
@Override
- public Query rewrite(IndexReader reader) throws IOException {
- Query rewritten = in.rewrite(reader);
+ public Query rewrite(IndexSearcher searcher) throws IOException {
+ Query rewritten = in.rewrite(searcher);
if (!rewritten.equals(in)) {
return new DeleteByQueryWrapper(rewritten, schema);
} else {
- return super.rewrite(reader);
+ return super.rewrite(searcher);
}
}
@@ -77,8 +77,23 @@ final class DeleteByQueryWrapper extends Query {
}
@Override
- public Scorer scorer(LeafReaderContext context) throws IOException {
- return inner.scorer(privateContext.getIndexReader().leaves().get(0));
+ public ScorerSupplier scorerSupplier(LeafReaderContext context) throws IOException {
+ LeafReaderContext privateLeafContext = privateContext.getIndexReader().leaves().get(0);
+ ScorerSupplier innerSupplier = inner.scorerSupplier(privateLeafContext);
+ if (innerSupplier == null) {
+ return null; // No scorer can be created for this context
+ }
+ return new ScorerSupplier() {
+ @Override
+ public Scorer get(long leadCost) throws IOException {
+ return innerSupplier.get(leadCost);
+ }
+
+ @Override
+ public long cost() {
+ return innerSupplier.cost();
+ }
+ };
}
@Override
diff --git a/solr/core/src/java/org/apache/solr/update/SolrIndexConfig.java b/solr/core/src/java/org/apache/solr/update/SolrIndexConfig.java
index 94c5e63aa37..463fa420d63 100644
--- a/solr/core/src/java/org/apache/solr/update/SolrIndexConfig.java
+++ b/solr/core/src/java/org/apache/solr/update/SolrIndexConfig.java
@@ -340,9 +340,10 @@ public class SolrIndexConfig implements MapSerializable {
((ConcurrentMergeScheduler) scheduler)
.setMaxMergesAndThreads(maxMergeCount, maxThreadCount);
Boolean ioThrottle = (Boolean) args.remove("ioThrottle");
- if (ioThrottle != null && !ioThrottle) { // by-default 'enabled'
- ((ConcurrentMergeScheduler) scheduler).disableAutoIOThrottle();
+ if (ioThrottle != null && ioThrottle) { // Only enable when explicitly enabled
+ ((ConcurrentMergeScheduler) scheduler).enableAutoIOThrottle();
}
+ // Default behavior matches Lucene 10's new default: disabled
SolrPluginUtils.invokeSetters(scheduler, args);
} else {
SolrPluginUtils.invokeSetters(scheduler, mergeSchedulerInfo.initArgs);
diff --git a/solr/core/src/java/org/apache/solr/update/SolrIndexSplitter.java b/solr/core/src/java/org/apache/solr/update/SolrIndexSplitter.java
index a7267fb298d..6c4194ebbf8 100644
--- a/solr/core/src/java/org/apache/solr/update/SolrIndexSplitter.java
+++ b/solr/core/src/java/org/apache/solr/update/SolrIndexSplitter.java
@@ -49,6 +49,7 @@ import org.apache.lucene.search.Query;
import org.apache.lucene.search.QueryVisitor;
import org.apache.lucene.search.ScoreMode;
import org.apache.lucene.search.Scorer;
+import org.apache.lucene.search.ScorerSupplier;
import org.apache.lucene.search.Weight;
import org.apache.lucene.store.Directory;
import org.apache.lucene.store.IOContext;
@@ -551,7 +552,7 @@ public class SolrIndexSplitter {
return new ConstantScoreWeight(this, boost) {
@Override
- public Scorer scorer(LeafReaderContext context) throws IOException {
+ public ScorerSupplier scorerSupplier(LeafReaderContext context) throws IOException {
RTimerTree t = timings.sub("findDocsToDelete");
t.resume();
FixedBitSet set = findDocsToDelete(context);
@@ -576,8 +577,19 @@ public class SolrIndexSplitter {
log.error("### INVALID DELS {}", dels.cardinality());
}
}
- return new ConstantScoreScorer(
- this, score(), scoreMode, new BitSetIterator(set, set.length()));
+ final float score = score();
+ return new ScorerSupplier() {
+ @Override
+ public Scorer get(long leadCost) {
+ return new ConstantScoreScorer(
+ score, scoreMode, new BitSetIterator(set, set.length()));
+ }
+
+ @Override
+ public long cost() {
+ return set.cardinality();
+ }
+ };
}
@Override
diff --git a/solr/core/src/java/org/apache/solr/update/processor/ClassificationUpdateProcessor.java b/solr/core/src/java/org/apache/solr/update/processor/ClassificationUpdateProcessor.java
index f7bc7fa8c1d..ba60aa83219 100644
--- a/solr/core/src/java/org/apache/solr/update/processor/ClassificationUpdateProcessor.java
+++ b/solr/core/src/java/org/apache/solr/update/processor/ClassificationUpdateProcessor.java
@@ -130,7 +130,7 @@ class ClassificationUpdateProcessor extends UpdateRequestProcessor {
classifier.getClasses(luceneDocument, maxOutputClasses);
if (assignedClassifications != null) {
for (ClassificationResult<BytesRef> singleClassification : assignedClassifications) {
- String assignedClass = singleClassification.getAssignedClass().utf8ToString();
+ String assignedClass = singleClassification.assignedClass().utf8ToString();
doc.addField(predictedClassField, assignedClass);
}
}
diff --git a/solr/core/src/java/org/apache/solr/update/processor/PreAnalyzedUpdateProcessorFactory.java b/solr/core/src/java/org/apache/solr/update/processor/PreAnalyzedUpdateProcessorFactory.java
index f5ed21b2f73..28206d7c638 100644
--- a/solr/core/src/java/org/apache/solr/update/processor/PreAnalyzedUpdateProcessorFactory.java
+++ b/solr/core/src/java/org/apache/solr/update/processor/PreAnalyzedUpdateProcessorFactory.java
@@ -18,6 +18,7 @@ package org.apache.solr.update.processor;
import java.lang.invoke.MethodHandles;
import java.util.HashMap;
+import java.util.List;
import java.util.Map;
import org.apache.lucene.document.Document;
import org.apache.lucene.document.Field;
@@ -164,10 +165,23 @@ class PreAnalyzedUpdateProcessor extends FieldMutatingUpdateProcessor {
if (o == null) {
continue;
}
- Field pre = (Field) parser.createField(sf, o);
- if (pre != null) {
- res.addValue(pre);
- } else { // restore the original value
+ try {
+ // In Lucene 10, createFields returns a list of fields
+ // For pre-analyzed fields, this is typically a single field that handles both stored and
+ // indexed content
+ List<IndexableField> fields = parser.createFields(sf, o);
+ if (fields != null && !fields.isEmpty()) {
+ // Add the field(s) returned - typically a single field that handles both stored and
+ // indexed
+ for (IndexableField field : fields) {
+ res.addValue(field);
+ }
+ } else { // restore the original value
+ log.warn("Could not parse field {} - using original value as is: {}", src.getName(), o);
+ res.addValue(o);
+ }
+ } catch (Exception e) {
+ // If parsing fails, fall back to the original value
log.warn("Could not parse field {} - using original value as is: {}", src.getName(), o);
res.addValue(o);
}
diff --git a/solr/core/src/java/org/apache/solr/util/SolrPluginUtils.java b/solr/core/src/java/org/apache/solr/util/SolrPluginUtils.java
index e6814b3fd0f..aa19b6d25f4 100644
--- a/solr/core/src/java/org/apache/solr/util/SolrPluginUtils.java
+++ b/solr/core/src/java/org/apache/solr/util/SolrPluginUtils.java
@@ -587,9 +587,9 @@ public class SolrPluginUtils {
int maxDisjunctsSize = 0;
int optionalDismaxClauses = 0;
for (BooleanClause c : q.build().clauses()) {
- if (c.getOccur() == Occur.SHOULD) {
- if (mmAutoRelax && c.getQuery() instanceof DisjunctionMaxQuery) {
- int numDisjuncts = ((DisjunctionMaxQuery) c.getQuery()).getDisjuncts().size();
+ if (c.occur() == Occur.SHOULD) {
+ if (mmAutoRelax && c.query() instanceof DisjunctionMaxQuery) {
+ int numDisjuncts = ((DisjunctionMaxQuery) c.query()).getDisjuncts().size();
if (numDisjuncts > maxDisjunctsSize) {
maxDisjunctsSize = numDisjuncts;
optionalDismaxClauses = 1;
@@ -710,7 +710,7 @@ public class SolrPluginUtils {
for (BooleanClause clause : from.clauses()) {
- Query cq = clause.getQuery();
+ Query cq = clause.query();
float boost = fromBoost;
while (cq instanceof BoostQuery bq) {
cq = bq.getQuery();
diff --git a/solr/core/src/test-files/solr/collection1/conf/schema_codec.xml b/solr/core/src/test-files/solr/collection1/conf/schema_codec.xml
index 5095c0c01ac..a23f5fbc285 100644
--- a/solr/core/src/test-files/solr/collection1/conf/schema_codec.xml
+++ b/solr/core/src/test-files/solr/collection1/conf/schema_codec.xml
@@ -20,7 +20,7 @@
as a way to vet that the configuration actually matters.
-->
<fieldType name="string_direct" class="solr.StrField" postingsFormat="Direct" docValuesFormat="Asserting" />
- <fieldType name="string_standard" class="solr.StrField" postingsFormat="Lucene912"/>
+ <fieldType name="string_standard" class="solr.StrField" postingsFormat="Lucene101"/>
<fieldType name="string_disk" class="solr.StrField" />
diff --git a/solr/core/src/test/org/apache/solr/TestHighlightDedupGrouping.java b/solr/core/src/test/org/apache/solr/TestHighlightDedupGrouping.java
index fa828e51370..2bb2d6d9e4b 100644
--- a/solr/core/src/test/org/apache/solr/TestHighlightDedupGrouping.java
+++ b/solr/core/src/test/org/apache/solr/TestHighlightDedupGrouping.java
@@ -17,12 +17,10 @@
package org.apache.solr;
import java.io.IOException;
-import org.apache.lucene.search.TimeLimitingCollector;
import org.apache.lucene.tests.util.TestUtil;
import org.apache.solr.client.solrj.SolrServerException;
import org.apache.solr.client.solrj.response.QueryResponse;
import org.apache.solr.common.SolrInputDocument;
-import org.junit.AfterClass;
import org.junit.Test;
/**
@@ -35,12 +33,6 @@ public class TestHighlightDedupGrouping extends BaseDistributedSearchTestCase {
private static final String group_ti1 = "group_ti1";
private static final String shard_i1 = "shard_i1";
- @AfterClass
- public static void afterClass() throws Exception {
- TimeLimitingCollector.getGlobalTimerThread().stopTimer();
- TimeLimitingCollector.getGlobalTimerThread().join();
- }
-
@Test
@ShardsFixed(num = 2)
public void test() throws Exception {
diff --git a/solr/core/src/test/org/apache/solr/blockcache/BlockDirectoryTest.java b/solr/core/src/test/org/apache/solr/blockcache/BlockDirectoryTest.java
index 4e8078bc63c..fc324dbd052 100644
--- a/solr/core/src/test/org/apache/solr/blockcache/BlockDirectoryTest.java
+++ b/solr/core/src/test/org/apache/solr/blockcache/BlockDirectoryTest.java
@@ -150,16 +150,13 @@ public class BlockDirectoryTest extends SolrTestCaseJ4 {
}
private void testEof(String name, Directory directory, long length) throws IOException {
- IndexInput input = directory.openInput(name, new IOContext());
- try {
+ try (IndexInput input = directory.openInput(name, IOContext.DEFAULT)) {
input.seek(length);
try {
input.readByte();
fail("should throw eof");
- } catch (IOException e) {
+ } catch (IOException ignored) {
}
- } finally {
- input.close();
}
}
@@ -191,8 +188,8 @@ public class BlockDirectoryTest extends SolrTestCaseJ4 {
private void assertInputsEquals(String name, Directory fsDir, Directory hdfs) throws IOException {
int reads = random.nextInt(MAX_NUMBER_OF_READS);
- IndexInput fsInput = fsDir.openInput(name, new IOContext());
- IndexInput hdfsInput = hdfs.openInput(name, new IOContext());
+ IndexInput fsInput = fsDir.openInput(name, IOContext.DEFAULT);
+ IndexInput hdfsInput = hdfs.openInput(name, IOContext.DEFAULT);
assertEquals(fsInput.length(), hdfsInput.length());
int fileLength = (int) fsInput.length();
for (int i = 0; i < reads; i++) {
diff --git a/solr/core/src/test/org/apache/solr/cloud/TestLeaderElectionZkExpiry.java b/solr/core/src/test/org/apache/solr/cloud/TestLeaderElectionZkExpiry.java
index 2c8520ddc22..1a4b3ae31ba 100644
--- a/solr/core/src/test/org/apache/solr/cloud/TestLeaderElectionZkExpiry.java
+++ b/solr/core/src/test/org/apache/solr/cloud/TestLeaderElectionZkExpiry.java
@@ -20,7 +20,7 @@ import java.lang.invoke.MethodHandles;
import java.nio.file.Path;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.TimeUnit;
-import org.apache.lucene.tests.util.LuceneTestCase.BadApple;
+import org.apache.lucene.tests.util.LuceneTestCase.AwaitsFix;
import org.apache.solr.SolrTestCaseJ4;
import org.apache.solr.common.cloud.SolrZkClient;
import org.apache.solr.common.util.ExecutorUtil;
@@ -34,7 +34,7 @@ import org.junit.Test;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-@BadApple(bugUrl = "https://issues.apache.org/jira/browse/SOLR-16122")
+@AwaitsFix(bugUrl = "https://issues.apache.org/jira/browse/SOLR-16122")
public class TestLeaderElectionZkExpiry extends SolrTestCaseJ4 {
private static final Logger log = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
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 849f6a997a7..6ba3efc6c9f 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.lucene912.Lucene912Codec.Mode;
+import org.apache.lucene.codecs.lucene101.Lucene101Codec.Mode;
import org.apache.lucene.codecs.perfield.PerFieldDocValuesFormat;
import org.apache.lucene.codecs.perfield.PerFieldPostingsFormat;
import org.apache.lucene.index.SegmentInfo;
@@ -50,13 +50,9 @@ public class TestCodecSupport extends SolrTestCaseJ4 {
PerFieldPostingsFormat format = (PerFieldPostingsFormat) codec.postingsFormat();
assertEquals("Direct", format.getPostingsFormatForField(schemaField.getName()).getName());
schemaField = fields.get("string_standard_f");
- assertEquals(
- TestUtil.getDefaultPostingsFormat().getName(),
- format.getPostingsFormatForField(schemaField.getName()).getName());
+ assertEquals("Lucene101", format.getPostingsFormatForField(schemaField.getName()).getName());
schemaField = fields.get("string_f");
- assertEquals(
- TestUtil.getDefaultPostingsFormat().getName(),
- format.getPostingsFormatForField(schemaField.getName()).getName());
+ assertEquals("Lucene101", format.getPostingsFormatForField(schemaField.getName()).getName());
}
public void testDocValuesFormats() {
@@ -83,12 +79,8 @@ public class TestCodecSupport extends SolrTestCaseJ4 {
assertEquals("Direct", format.getPostingsFormatForField("foo_direct").getName());
assertEquals("Direct", format.getPostingsFormatForField("bar_direct").getName());
- assertEquals(
- TestUtil.getDefaultPostingsFormat().getName(),
- format.getPostingsFormatForField("foo_standard").getName());
- assertEquals(
- TestUtil.getDefaultPostingsFormat().getName(),
- format.getPostingsFormatForField("bar_standard").getName());
+ assertEquals("Lucene101", format.getPostingsFormatForField("foo_standard").getName());
+ assertEquals("Lucene101", format.getPostingsFormatForField("bar_standard").getName());
}
public void testDynamicFieldsDocValuesFormats() {
diff --git a/solr/core/src/test/org/apache/solr/core/TestQuerySenderNoQuery.java b/solr/core/src/test/org/apache/solr/core/TestQuerySenderNoQuery.java
index 7c14adc41e0..820b310098e 100644
--- a/solr/core/src/test/org/apache/solr/core/TestQuerySenderNoQuery.java
+++ b/solr/core/src/test/org/apache/solr/core/TestQuerySenderNoQuery.java
@@ -84,7 +84,8 @@ public class TestQuerySenderNoQuery extends SolrTestCaseJ4 {
core.getSolrConfig().indexConfig,
"testQuerySenderNoQuery",
false,
- core.getDirectoryFactory());
+ core.getDirectoryFactory(),
+ core.getSolrConfig().booleanQueryMaxClauseCount);
qsl.newSearcher(newSearcher, currentSearcher); // get newSearcher.
assertNull("Req (newsearcher) is not null", mock.req);
diff --git a/solr/core/src/test/org/apache/solr/handler/TestReplicationHandlerBackup.java b/solr/core/src/test/org/apache/solr/handler/TestReplicationHandlerBackup.java
index edf3ab19143..e147bb44dcc 100644
--- a/solr/core/src/test/org/apache/solr/handler/TestReplicationHandlerBackup.java
+++ b/solr/core/src/test/org/apache/solr/handler/TestReplicationHandlerBackup.java
@@ -144,7 +144,7 @@ public class TestReplicationHandlerBackup extends SolrJettyTestBase {
IndexReader reader = DirectoryReader.open(dir)) {
IndexSearcher searcher = new IndexSearcher(reader);
TopDocs hits = searcher.search(new MatchAllDocsQuery(), 1);
- assertEquals(nDocs, hits.totalHits.value);
+ assertEquals(nDocs, hits.totalHits.value());
}
}
diff --git a/solr/core/src/test/org/apache/solr/handler/TestSnapshotCoreBackup.java b/solr/core/src/test/org/apache/solr/handler/TestSnapshotCoreBackup.java
index 91021c144e9..d812cdb32c7 100644
--- a/solr/core/src/test/org/apache/solr/handler/TestSnapshotCoreBackup.java
+++ b/solr/core/src/test/org/apache/solr/handler/TestSnapshotCoreBackup.java
@@ -20,6 +20,7 @@ import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Path;
import java.util.Arrays;
+import org.apache.lucene.index.CheckIndex;
import org.apache.lucene.index.DirectoryReader;
import org.apache.lucene.index.IndexCommit;
import org.apache.lucene.store.Directory;
@@ -452,7 +453,7 @@ public class TestSnapshotCoreBackup extends SolrTestCaseJ4 {
Files.exists(backup.resolve(expectedSegmentsFileName)));
}
try (Directory dir = FSDirectory.open(backup)) {
- TestUtil.checkIndex(dir, true, true, true, null);
+ TestUtil.checkIndex(dir, CheckIndex.Level.MIN_LEVEL_FOR_SLOW_CHECKS, true, true, null);
try (DirectoryReader r = DirectoryReader.open(dir)) {
assertEquals("numDocs in " + backup, numDocs, r.numDocs());
if (null != expectedSegmentsFileName) {
diff --git a/solr/core/src/test/org/apache/solr/handler/TestStressThreadBackup.java b/solr/core/src/test/org/apache/solr/handler/TestStressThreadBackup.java
index 5357fc45e82..838afd394ad 100644
--- a/solr/core/src/test/org/apache/solr/handler/TestStressThreadBackup.java
+++ b/solr/core/src/test/org/apache/solr/handler/TestStressThreadBackup.java
@@ -31,6 +31,7 @@ import java.util.regex.Matcher;
import java.util.regex.Pattern;
import java.util.stream.Collectors;
import java.util.stream.Stream;
+import org.apache.lucene.index.CheckIndex;
import org.apache.lucene.index.DirectoryReader;
import org.apache.lucene.index.Term;
import org.apache.lucene.store.Directory;
@@ -334,7 +335,7 @@ public class TestStressThreadBackup extends SolrCloudTestCase {
final int numRealDocsExpected = Integer.parseInt(m.group());
try (Directory dir = FSDirectory.open(backup)) {
- TestUtil.checkIndex(dir, true, true, true, null);
+ TestUtil.checkIndex(dir, CheckIndex.Level.MIN_LEVEL_FOR_SLOW_CHECKS, true, true, null);
try (DirectoryReader r = DirectoryReader.open(dir)) {
assertEquals(
"num real docs in " + backup,
diff --git a/solr/core/src/test/org/apache/solr/handler/component/QueryElevationComponentTest.java b/solr/core/src/test/org/apache/solr/handler/component/QueryElevationComponentTest.java
index 3300ab741c6..aa2b70c0132 100644
--- a/solr/core/src/test/org/apache/solr/handler/component/QueryElevationComponentTest.java
+++ b/solr/core/src/test/org/apache/solr/handler/component/QueryElevationComponentTest.java
@@ -572,7 +572,7 @@ public class QueryElevationComponentTest extends SolrTestCaseJ4 {
assertEquals(2, booleanQuery.clauses().size());
// the first clause is the original query, which is a WrappedQuery because the cache=false
// local param was provided; the WrappedQuery doesn't cache; it contains a TermQuery
- Query firstClause = booleanQuery.clauses().get(0).getQuery();
+ Query firstClause = booleanQuery.clauses().get(0).query();
assertTrue(firstClause instanceof WrappedQuery);
assertFalse(((WrappedQuery) firstClause).getCache());
assertTrue(((WrappedQuery) firstClause).getWrappedQuery() instanceof TermQuery);
@@ -589,7 +589,7 @@ public class QueryElevationComponentTest extends SolrTestCaseJ4 {
// the first clause is a FilterQuery that contains the original query
// (ElevateComponent introduces this FilterQuery to make sure the original query consults
// the cache)
- Query firstClause = booleanQuery.clauses().get(0).getQuery();
+ Query firstClause = booleanQuery.clauses().get(0).query();
assertTrue(firstClause instanceof FilterQuery);
FilterQuery filterQuery = (FilterQuery) firstClause;
// the first clause is the original query, which is a WrappedQuery because the cache=false
@@ -609,7 +609,7 @@ public class QueryElevationComponentTest extends SolrTestCaseJ4 {
BooleanQuery booleanQuery = (BooleanQuery) ((WrappedQuery) filters[5]).getWrappedQuery();
assertEquals(2, booleanQuery.clauses().size());
// the first clause is a FilterQuery that contains the original query
- Query firstClause = booleanQuery.clauses().get(0).getQuery();
+ Query firstClause = booleanQuery.clauses().get(0).query();
assertTrue(firstClause instanceof FilterQuery);
FilterQuery filterQuery = (FilterQuery) firstClause;
// the original query is a TermQuery
@@ -625,7 +625,7 @@ public class QueryElevationComponentTest extends SolrTestCaseJ4 {
BooleanQuery booleanQuery = (BooleanQuery) ((WrappedQuery) filters[6]).getWrappedQuery();
assertEquals(2, booleanQuery.clauses().size());
// the first clause is the original query, which is a FilterQuery containing a TermQuery
- Query firstClause = booleanQuery.clauses().get(0).getQuery();
+ Query firstClause = booleanQuery.clauses().get(0).query();
assertTrue(firstClause instanceof FilterQuery);
FilterQuery filterQuery = (FilterQuery) firstClause;
assertTrue(filterQuery.getQuery() instanceof TermQuery);
@@ -640,7 +640,7 @@ public class QueryElevationComponentTest extends SolrTestCaseJ4 {
BooleanQuery booleanQuery = (BooleanQuery) ((WrappedQuery) filters[7]).getWrappedQuery();
assertEquals(2, booleanQuery.clauses().size());
// the first clause is the original query, which is a FilterQuery containing a TermQuery
- Query firstClause = booleanQuery.clauses().get(0).getQuery();
+ Query firstClause = booleanQuery.clauses().get(0).query();
assertTrue(firstClause instanceof FilterQuery);
FilterQuery filterQuery = (FilterQuery) firstClause;
assertTrue(filterQuery.getQuery() instanceof TermQuery);
diff --git a/solr/core/src/test/org/apache/solr/legacy/TestLegacyField.java b/solr/core/src/test/org/apache/solr/legacy/TestLegacyField.java
index ee523515613..e8b211d2bc7 100644
--- a/solr/core/src/test/org/apache/solr/legacy/TestLegacyField.java
+++ b/solr/core/src/test/org/apache/solr/legacy/TestLegacyField.java
@@ -203,7 +203,7 @@ public class TestLegacyField extends SolrTestCase {
private void trySetTokenStreamValue(Field f) {
expectThrows(
- IllegalArgumentException.class,
+ UnsupportedOperationException.class,
() -> {
f.setTokenStream(new CannedTokenStream(new Token("foo", 0, 3)));
});
diff --git a/solr/core/src/test/org/apache/solr/legacy/TestMultiValuedNumericRangeQuery.java b/solr/core/src/test/org/apache/solr/legacy/TestMultiValuedNumericRangeQuery.java
index c38a405471c..3a169b4165d 100644
--- a/solr/core/src/test/org/apache/solr/legacy/TestMultiValuedNumericRangeQuery.java
+++ b/solr/core/src/test/org/apache/solr/legacy/TestMultiValuedNumericRangeQuery.java
@@ -26,6 +26,7 @@ import org.apache.lucene.search.IndexSearcher;
import org.apache.lucene.search.TermRangeQuery;
import org.apache.lucene.search.TopDocs;
import org.apache.lucene.search.TopScoreDocCollector;
+import org.apache.lucene.search.TopScoreDocCollectorManager;
import org.apache.lucene.store.Directory;
import org.apache.lucene.tests.analysis.MockAnalyzer;
import org.apache.lucene.tests.index.RandomIndexWriter;
@@ -79,16 +80,19 @@ public class TestMultiValuedNumericRangeQuery extends SolrTestCase {
"asc", format.format(lower), format.format(upper), true, true);
LegacyNumericRangeQuery<Integer> tq =
LegacyNumericRangeQuery.newIntRange("trie", lower, upper, true, true);
- TopScoreDocCollector trCollector = TopScoreDocCollector.create(1, Integer.MAX_VALUE);
- TopScoreDocCollector nrCollector = TopScoreDocCollector.create(1, Integer.MAX_VALUE);
+
+ TopScoreDocCollectorManager trManager = new TopScoreDocCollectorManager(1, Integer.MAX_VALUE);
+ TopScoreDocCollector trCollector = trManager.newCollector();
+ TopScoreDocCollectorManager nrManager = new TopScoreDocCollectorManager(1, Integer.MAX_VALUE);
+ TopScoreDocCollector nrCollector = nrManager.newCollector();
searcher.search(cq, trCollector);
searcher.search(tq, nrCollector);
TopDocs trTopDocs = trCollector.topDocs();
TopDocs nrTopDocs = nrCollector.topDocs();
assertEquals(
"Returned count for LegacyNumericRangeQuery and TermRangeQuery must be equal",
- trTopDocs.totalHits.value,
- nrTopDocs.totalHits.value);
+ trTopDocs.totalHits.value(),
+ nrTopDocs.totalHits.value());
}
reader.close();
directory.close();
diff --git a/solr/core/src/test/org/apache/solr/legacy/TestNumericRangeQuery32.java b/solr/core/src/test/org/apache/solr/legacy/TestNumericRangeQuery32.java
index d045b2a8e24..bc0b7c04299 100644
--- a/solr/core/src/test/org/apache/solr/legacy/TestNumericRangeQuery32.java
+++ b/solr/core/src/test/org/apache/solr/legacy/TestNumericRangeQuery32.java
@@ -27,7 +27,9 @@ import org.apache.lucene.search.ScoreDoc;
import org.apache.lucene.search.Sort;
import org.apache.lucene.search.TopDocs;
import org.apache.lucene.search.TopFieldCollector;
+import org.apache.lucene.search.TopFieldCollectorManager;
import org.apache.lucene.search.TopScoreDocCollector;
+import org.apache.lucene.search.TopScoreDocCollectorManager;
import org.apache.lucene.store.Directory;
import org.apache.lucene.tests.analysis.MockAnalyzer;
import org.apache.lucene.tests.index.RandomIndexWriter;
@@ -160,20 +162,35 @@ public class TestNumericRangeQuery32 extends SolrTestCase {
String field = "field" + precisionStep;
int count = 3000;
int lower = (distance * 3 / 2) + startOffset, upper = lower + count * distance + (distance / 3);
- LegacyNumericRangeQuery<Integer> q =
- LegacyNumericRangeQuery.newIntRange(field, precisionStep, lower, upper, true, true);
for (byte i = 0; i < 2; i++) {
TopFieldCollector collector =
- TopFieldCollector.create(Sort.INDEXORDER, noDocs, Integer.MAX_VALUE);
+ new TopFieldCollectorManager(Sort.INDEXORDER, noDocs, Integer.MAX_VALUE).newCollector();
String type;
+ LegacyNumericRangeQuery<Integer> q;
switch (i) {
case 0:
type = " (constant score filter rewrite)";
- q.setRewriteMethod(MultiTermQuery.CONSTANT_SCORE_REWRITE);
+ q =
+ LegacyNumericRangeQuery.newIntRange(
+ field,
+ precisionStep,
+ lower,
+ upper,
+ true,
+ true,
+ MultiTermQuery.CONSTANT_SCORE_REWRITE);
break;
case 1:
type = " (constant score boolean rewrite)";
- q.setRewriteMethod(MultiTermQuery.CONSTANT_SCORE_BOOLEAN_REWRITE);
+ q =
+ LegacyNumericRangeQuery.newIntRange(
+ field,
+ precisionStep,
+ lower,
+ upper,
+ true,
+ true,
+ MultiTermQuery.CONSTANT_SCORE_BOOLEAN_REWRITE);
break;
default:
return;
@@ -275,7 +292,7 @@ public class TestNumericRangeQuery32 extends SolrTestCase {
LegacyNumericRangeQuery<Integer> q =
LegacyNumericRangeQuery.newIntRange(field, precisionStep, lower, null, true, true);
TopFieldCollector collector =
- TopFieldCollector.create(Sort.INDEXORDER, noDocs, Integer.MAX_VALUE);
+ new TopFieldCollectorManager(Sort.INDEXORDER, noDocs, Integer.MAX_VALUE).newCollector();
searcher.search(q, collector);
TopDocs topDocs = collector.topDocs();
ScoreDoc[] sd = topDocs.scoreDocs;
@@ -291,7 +308,8 @@ public class TestNumericRangeQuery32 extends SolrTestCase {
doc.getField(field).numericValue().intValue());
q = LegacyNumericRangeQuery.newIntRange(field, precisionStep, lower, null, true, false);
- collector = TopFieldCollector.create(Sort.INDEXORDER, noDocs, Integer.MAX_VALUE);
+ collector =
+ new TopFieldCollectorManager(Sort.INDEXORDER, noDocs, Integer.MAX_VALUE).newCollector();
searcher.search(q, collector);
topDocs = collector.topDocs();
sd = topDocs.scoreDocs;
@@ -417,40 +435,44 @@ public class TestNumericRangeQuery32 extends SolrTestCase {
// test inclusive range
Query tq =
LegacyNumericRangeQuery.newIntRange(field, precisionStep, lower, upper, true, true);
- TopScoreDocCollector collector = TopScoreDocCollector.create(1, Integer.MAX_VALUE);
+ TopScoreDocCollectorManager manager = new TopScoreDocCollectorManager(1, Integer.MAX_VALUE);
+ TopScoreDocCollector collector = manager.newCollector();
searcher.search(tq, collector);
TopDocs tTopDocs = collector.topDocs();
assertEquals(
"Returned count of range query must be equal to inclusive range length",
upper - lower + 1,
- tTopDocs.totalHits.value);
+ tTopDocs.totalHits.value());
// test exclusive range
tq = LegacyNumericRangeQuery.newIntRange(field, precisionStep, lower, upper, false, false);
- collector = TopScoreDocCollector.create(1, Integer.MAX_VALUE);
+ manager = new TopScoreDocCollectorManager(1, Integer.MAX_VALUE);
+ collector = manager.newCollector();
searcher.search(tq, collector);
tTopDocs = collector.topDocs();
assertEquals(
"Returned count of range query must be equal to exclusive range length",
Math.max(upper - lower - 1, 0),
- tTopDocs.totalHits.value);
+ tTopDocs.totalHits.value());
// test left exclusive range
tq = LegacyNumericRangeQuery.newIntRange(field, precisionStep, lower, upper, false, true);
- collector = TopScoreDocCollector.create(1, Integer.MAX_VALUE);
+ manager = new TopScoreDocCollectorManager(1, Integer.MAX_VALUE);
+ collector = manager.newCollector();
searcher.search(tq, collector);
tTopDocs = collector.topDocs();
assertEquals(
"Returned count of range query must be equal to half exclusive range length",
upper - lower,
- tTopDocs.totalHits.value);
+ tTopDocs.totalHits.value());
// test right exclusive range
tq = LegacyNumericRangeQuery.newIntRange(field, precisionStep, lower, upper, true, false);
- collector = TopScoreDocCollector.create(1, Integer.MAX_VALUE);
+ manager = new TopScoreDocCollectorManager(1, Integer.MAX_VALUE);
+ collector = manager.newCollector();
searcher.search(tq, collector);
tTopDocs = collector.topDocs();
assertEquals(
"Returned count of range query must be equal to half exclusive range length",
upper - lower,
- tTopDocs.totalHits.value);
+ tTopDocs.totalHits.value());
}
}
@@ -482,13 +504,14 @@ public class TestNumericRangeQuery32 extends SolrTestCase {
NumericUtils.sortableIntToFloat(upper),
true,
true);
- TopScoreDocCollector collector = TopScoreDocCollector.create(1, Integer.MAX_VALUE);
+ TopScoreDocCollectorManager manager = new TopScoreDocCollectorManager(1, Integer.MAX_VALUE);
+ TopScoreDocCollector collector = manager.newCollector();
searcher.search(tq, collector);
TopDocs tTopDocs = collector.topDocs();
assertEquals(
"Returned count of range query must be equal to inclusive range length",
upper - lower + 1,
- tTopDocs.totalHits.value);
+ tTopDocs.totalHits.value());
}
@Test
diff --git a/solr/core/src/test/org/apache/solr/legacy/TestNumericRangeQuery64.java b/solr/core/src/test/org/apache/solr/legacy/TestNumericRangeQuery64.java
index b71dcefb0bd..60463ba6c04 100644
--- a/solr/core/src/test/org/apache/solr/legacy/TestNumericRangeQuery64.java
+++ b/solr/core/src/test/org/apache/solr/legacy/TestNumericRangeQuery64.java
@@ -27,7 +27,9 @@ import org.apache.lucene.search.ScoreDoc;
import org.apache.lucene.search.Sort;
import org.apache.lucene.search.TopDocs;
import org.apache.lucene.search.TopFieldCollector;
+import org.apache.lucene.search.TopFieldCollectorManager;
import org.apache.lucene.search.TopScoreDocCollector;
+import org.apache.lucene.search.TopScoreDocCollectorManager;
import org.apache.lucene.store.Directory;
import org.apache.lucene.tests.analysis.MockAnalyzer;
import org.apache.lucene.tests.index.RandomIndexWriter;
@@ -172,20 +174,35 @@ public class TestNumericRangeQuery64 extends SolrTestCase {
int count = 3000;
long lower = (distance * 3 / 2) + startOffset,
upper = lower + count * distance + (distance / 3);
- LegacyNumericRangeQuery<Long> q =
- LegacyNumericRangeQuery.newLongRange(field, precisionStep, lower, upper, true, true);
for (byte i = 0; i < 2; i++) {
TopFieldCollector collector =
- TopFieldCollector.create(Sort.INDEXORDER, noDocs, Integer.MAX_VALUE);
+ new TopFieldCollectorManager(Sort.INDEXORDER, noDocs, Integer.MAX_VALUE).newCollector();
String type;
+ LegacyNumericRangeQuery<Long> q;
switch (i) {
case 0:
type = " (constant score filter rewrite)";
- q.setRewriteMethod(MultiTermQuery.CONSTANT_SCORE_REWRITE);
+ q =
+ LegacyNumericRangeQuery.newLongRange(
+ field,
+ precisionStep,
+ lower,
+ upper,
+ true,
+ true,
+ MultiTermQuery.CONSTANT_SCORE_REWRITE);
break;
case 1:
type = " (constant score boolean rewrite)";
- q.setRewriteMethod(MultiTermQuery.CONSTANT_SCORE_BOOLEAN_REWRITE);
+ q =
+ LegacyNumericRangeQuery.newLongRange(
+ field,
+ precisionStep,
+ lower,
+ upper,
+ true,
+ true,
+ MultiTermQuery.CONSTANT_SCORE_BOOLEAN_REWRITE);
break;
default:
return;
@@ -440,40 +457,44 @@ public class TestNumericRangeQuery64 extends SolrTestCase {
// test inclusive range
Query tq =
LegacyNumericRangeQuery.newLongRange(field, precisionStep, lower, upper, true, true);
- TopScoreDocCollector collector = TopScoreDocCollector.create(1, Integer.MAX_VALUE);
+ TopScoreDocCollectorManager manager = new TopScoreDocCollectorManager(1, Integer.MAX_VALUE);
+ TopScoreDocCollector collector = manager.newCollector();
searcher.search(tq, collector);
TopDocs tTopDocs = collector.topDocs();
assertEquals(
"Returned count of range query must be equal to inclusive range length",
upper - lower + 1,
- tTopDocs.totalHits.value);
+ tTopDocs.totalHits.value());
// test exclusive range
tq = LegacyNumericRangeQuery.newLongRange(field, precisionStep, lower, upper, false, false);
- collector = TopScoreDocCollector.create(1, Integer.MAX_VALUE);
+ manager = new TopScoreDocCollectorManager(1, Integer.MAX_VALUE);
+ collector = manager.newCollector();
searcher.search(tq, collector);
tTopDocs = collector.topDocs();
assertEquals(
"Returned count of range query must be equal to exclusive range length",
Math.max(upper - lower - 1, 0),
- tTopDocs.totalHits.value);
+ tTopDocs.totalHits.value());
// test left exclusive range
tq = LegacyNumericRangeQuery.newLongRange(field, precisionStep, lower, upper, false, true);
- collector = TopScoreDocCollector.create(1, Integer.MAX_VALUE);
+ manager = new TopScoreDocCollectorManager(1, Integer.MAX_VALUE);
+ collector = manager.newCollector();
searcher.search(tq, collector);
tTopDocs = collector.topDocs();
assertEquals(
"Returned count of range query must be equal to half exclusive range length",
upper - lower,
- tTopDocs.totalHits.value);
+ tTopDocs.totalHits.value());
// test right exclusive range
tq = LegacyNumericRangeQuery.newLongRange(field, precisionStep, lower, upper, true, false);
- collector = TopScoreDocCollector.create(1, Integer.MAX_VALUE);
+ manager = new TopScoreDocCollectorManager(1, Integer.MAX_VALUE);
+ collector = manager.newCollector();
searcher.search(tq, collector);
tTopDocs = collector.topDocs();
assertEquals(
"Returned count of range query must be equal to half exclusive range length",
upper - lower,
- tTopDocs.totalHits.value);
+ tTopDocs.totalHits.value());
}
}
@@ -510,13 +531,14 @@ public class TestNumericRangeQuery64 extends SolrTestCase {
NumericUtils.sortableLongToDouble(upper),
true,
true);
- TopScoreDocCollector collector = TopScoreDocCollector.create(1, Integer.MAX_VALUE);
+ TopScoreDocCollectorManager manager = new TopScoreDocCollectorManager(1, Integer.MAX_VALUE);
+ TopScoreDocCollector collector = manager.newCollector();
searcher.search(tq, collector);
TopDocs tTopDocs = collector.topDocs();
assertEquals(
"Returned count of range query must be equal to inclusive range length",
upper - lower + 1,
- tTopDocs.totalHits.value);
+ tTopDocs.totalHits.value());
}
@Test
diff --git a/solr/core/src/test/org/apache/solr/schema/DocValuesMultiTest.java b/solr/core/src/test/org/apache/solr/schema/DocValuesMultiTest.java
index f23dac91902..f6c9a2ebb05 100644
--- a/solr/core/src/test/org/apache/solr/schema/DocValuesMultiTest.java
+++ b/solr/core/src/test/org/apache/solr/schema/DocValuesMultiTest.java
@@ -94,15 +94,17 @@ public class DocValuesMultiTest extends SolrTestCaseJ4 {
SortedSetDocValues dv = reader.getSortedSetDocValues("stringdv");
assertEquals(0, dv.nextDoc());
+ long docValueCount = dv.docValueCount();
+ assertEquals(2, docValueCount);
assertEquals(0, dv.nextOrd());
assertEquals(1, dv.nextOrd());
- assertEquals(SortedSetDocValues.NO_MORE_ORDS, dv.nextOrd());
dv = reader.getSortedSetDocValues("booldv");
assertEquals(0, dv.nextDoc());
+ docValueCount = dv.docValueCount();
+ assertEquals(2, docValueCount);
assertEquals(0, dv.nextOrd());
assertEquals(1, dv.nextOrd());
- assertEquals(SortedSetDocValues.NO_MORE_ORDS, dv.nextOrd());
} finally {
searcherRef.decref();
diff --git a/solr/core/src/test/org/apache/solr/schema/MyCrazyCustomField.java b/solr/core/src/test/org/apache/solr/schema/MyCrazyCustomField.java
index a0228dbc393..291f31ad363 100644
--- a/solr/core/src/test/org/apache/solr/schema/MyCrazyCustomField.java
+++ b/solr/core/src/test/org/apache/solr/schema/MyCrazyCustomField.java
@@ -51,8 +51,8 @@ public class MyCrazyCustomField extends TextField {
termStr = "foo";
}
- PrefixQuery query = new PrefixQuery(new Term(sf.getName(), termStr));
- query.setRewriteMethod(sf.getType().getRewriteMethod(parser, sf));
+ PrefixQuery query =
+ new PrefixQuery(new Term(sf.getName(), termStr), sf.getType().getRewriteMethod(parser, sf));
return query;
}
}
diff --git a/solr/core/src/test/org/apache/solr/schema/PreAnalyzedFieldTest.java b/solr/core/src/test/org/apache/solr/schema/PreAnalyzedFieldTest.java
index f7e40cd575b..24b89738467 100644
--- a/solr/core/src/test/org/apache/solr/schema/PreAnalyzedFieldTest.java
+++ b/solr/core/src/test/org/apache/solr/schema/PreAnalyzedFieldTest.java
@@ -19,10 +19,12 @@ package org.apache.solr.schema;
import java.lang.invoke.MethodHandles;
import java.util.Collections;
import java.util.HashMap;
+import java.util.List;
import org.apache.lucene.analysis.Analyzer;
import org.apache.lucene.analysis.TokenStream;
import org.apache.lucene.analysis.tokenattributes.CharTermAttribute;
import org.apache.lucene.document.Field;
+import org.apache.lucene.index.IndexableField;
import org.apache.solr.SolrTestCaseJ4;
import org.apache.solr.schema.PreAnalyzedField.PreAnalyzedParser;
import org.junit.BeforeClass;
@@ -112,9 +114,20 @@ public class PreAnalyzedFieldTest extends SolrTestCaseJ4 {
for (int i = 0; i < valid.length; i++) {
String s = valid[i];
try {
- Field f = (Field) paf.fromString(field, s);
- // System.out.println(" - toString: '" + sb.toString() + "'");
- assertEquals(validParsed[i], parser.toFormattedString(f));
+ List<IndexableField> fields = paf.createFields(field, s);
+ assertFalse("Should create at least one field", fields.isEmpty());
+ // Find the stored field for testing
+ Field storedField = null;
+ for (IndexableField f : fields) {
+ if (f instanceof Field && ((Field) f).fieldType().stored()) {
+ storedField = (Field) f;
+ break;
+ }
+ }
+ if (storedField != null) {
+ // System.out.println(" - toString: '" + sb.toString() + "'");
+ assertEquals(validParsed[i], parser.toFormattedString(storedField));
+ }
} catch (Exception e) {
log.error("Should pass: '{}', exception", s, e);
fail("Should pass: '" + s + "', exception: " + e);
@@ -194,8 +207,10 @@ public class PreAnalyzedFieldTest extends SolrTestCaseJ4 {
paf.init(h.getCore().getLatestSchema(), Collections.<String, String>emptyMap());
for (String s : invalidSimple) {
try {
- paf.fromString(field, s);
- fail("should fail: '" + s + "'");
+ List<IndexableField> fields = paf.createFields(field, s);
+ if (!fields.isEmpty()) {
+ fail("should fail: '" + s + "'");
+ }
} catch (Exception e) {
//
}
@@ -249,13 +264,20 @@ public class PreAnalyzedFieldTest extends SolrTestCaseJ4 {
args.put(PreAnalyzedField.PARSER_IMPL, SimplePreAnalyzedParser.class.getName());
paf.init(h.getCore().getLatestSchema(), args);
{
- Field f = (Field) paf.fromString(field, valid[0]);
+ List<IndexableField> fields = paf.createFields(field, valid[0]);
+ Field f = null;
+ for (IndexableField field : fields) {
+ if (field instanceof Field) {
+ f = (Field) field;
+ break;
+ }
+ }
}
// use JSON format
args.put(PreAnalyzedField.PARSER_IMPL, JsonPreAnalyzedParser.class.getName());
paf.init(h.getCore().getLatestSchema(), args);
- expectThrows(Exception.class, () -> paf.fromString(field, valid[0]));
+ expectThrows(Exception.class, () -> paf.createFields(field, valid[0]));
byte[] deadbeef =
new byte[] {
@@ -271,8 +293,17 @@ public class PreAnalyzedFieldTest extends SolrTestCaseJ4 {
PreAnalyzedParser parser = new JsonPreAnalyzedParser();
{
- Field f = (Field) paf.fromString(field, jsonValid);
- assertEquals(jsonValid, parser.toFormattedString(f));
+ List<IndexableField> fields = paf.createFields(field, jsonValid);
+ Field f = null;
+ for (IndexableField fld : fields) {
+ if (fld instanceof Field && ((Field) fld).fieldType().stored()) {
+ f = (Field) fld;
+ break;
+ }
+ }
+ if (f != null) {
+ assertEquals(jsonValid, parser.toFormattedString(f));
+ }
}
}
}
diff --git a/solr/core/src/test/org/apache/solr/search/MaxScoreCollectorTest.java b/solr/core/src/test/org/apache/solr/search/MaxScoreCollectorTest.java
index 397510230fd..554fd8936d1 100644
--- a/solr/core/src/test/org/apache/solr/search/MaxScoreCollectorTest.java
+++ b/solr/core/src/test/org/apache/solr/search/MaxScoreCollectorTest.java
@@ -74,11 +74,6 @@ public class MaxScoreCollectorTest extends SolrTestCase {
return nextScore;
}
- @Override
- public int docID() {
- return 0;
- }
-
@Override
public void setMinCompetitiveScore(float minScore) {
this.minCompetitiveScore = minScore;
diff --git a/solr/core/src/test/org/apache/solr/search/RankQueryTestPlugin.java b/solr/core/src/test/org/apache/solr/search/RankQueryTestPlugin.java
index 86dfb310438..efa865df224 100644
--- a/solr/core/src/test/org/apache/solr/search/RankQueryTestPlugin.java
+++ b/solr/core/src/test/org/apache/solr/search/RankQueryTestPlugin.java
@@ -478,11 +478,6 @@ public class RankQueryTestPlugin extends QParserPlugin {
this.score = score;
}
- @Override
- public int docID() {
- return docid;
- }
-
@Override
public float score() {
return score;
diff --git a/solr/core/src/test/org/apache/solr/search/TestCancellableCollector.java b/solr/core/src/test/org/apache/solr/search/TestCancellableCollector.java
index c6ec03f683e..2668358d75d 100644
--- a/solr/core/src/test/org/apache/solr/search/TestCancellableCollector.java
+++ b/solr/core/src/test/org/apache/solr/search/TestCancellableCollector.java
@@ -36,6 +36,7 @@ import org.apache.lucene.search.ScoreMode;
import org.apache.lucene.search.TermQuery;
import org.apache.lucene.search.TopDocs;
import org.apache.lucene.search.TopScoreDocCollector;
+import org.apache.lucene.search.TopScoreDocCollectorManager;
import org.apache.lucene.store.Directory;
import org.apache.lucene.tests.index.RandomIndexWriter;
import org.apache.lucene.util.BytesRef;
@@ -96,7 +97,8 @@ public class TestCancellableCollector extends SolrTestCase {
private CancellableCollector buildCancellableCollector(
final int numHits, boolean delayStart, boolean delayCollection) {
- TopScoreDocCollector topScoreDocCollector = TopScoreDocCollector.create(numHits, null, 1);
+ TopScoreDocCollectorManager manager = new TopScoreDocCollectorManager(numHits, 1);
+ TopScoreDocCollector topScoreDocCollector = manager.newCollector();
CancellableCollector collector = new CancellableCollector(topScoreDocCollector);
return new DummyCancellableCollector(collector, delayStart, delayCollection);
@@ -107,6 +109,7 @@ public class TestCancellableCollector extends SolrTestCase {
throws Exception {
TopDocs topDocs = searcher.search(query, numHits);
+ // Use deprecated search method for non-parallel search testing
searcher.search(query, cancellableCollector);
CancellableCollector internalCancellableCollector =
@@ -114,7 +117,7 @@ public class TestCancellableCollector extends SolrTestCase {
TopScoreDocCollector topScoreDocCollector =
(TopScoreDocCollector) internalCancellableCollector.getInternalCollector();
- assertEquals(topDocs.totalHits.value, topScoreDocCollector.getTotalHits());
+ assertEquals(topDocs.totalHits.value(), topScoreDocCollector.getTotalHits());
}
private void cancelQuery(CancellableCollector cancellableCollector) {
diff --git a/solr/core/src/test/org/apache/solr/search/TestCpuAllowedLimit.java b/solr/core/src/test/org/apache/solr/search/TestCpuAllowedLimit.java
index 740e385214c..dffac8f5a3c 100644
--- a/solr/core/src/test/org/apache/solr/search/TestCpuAllowedLimit.java
+++ b/solr/core/src/test/org/apache/solr/search/TestCpuAllowedLimit.java
@@ -25,6 +25,7 @@ import org.apache.solr.client.solrj.SolrClient;
import org.apache.solr.client.solrj.request.CollectionAdminRequest;
import org.apache.solr.client.solrj.response.QueryResponse;
import org.apache.solr.cloud.SolrCloudTestCase;
+import org.apache.solr.common.params.CommonParams;
import org.apache.solr.index.NoMergePolicyFactory;
import org.apache.solr.util.TestInjection;
import org.apache.solr.util.ThreadCpuTimer;
@@ -161,7 +162,7 @@ public class TestCpuAllowedLimit extends SolrCloudTestCase {
String.valueOf(sleepMs),
"stages",
"prepare,process",
- "multiThreaded",
+ CommonParams.MULTI_THREADED,
"false",
"timeAllowed",
"500"));
@@ -182,7 +183,7 @@ public class TestCpuAllowedLimit extends SolrCloudTestCase {
String.valueOf(sleepMs),
"stages",
"prepare,process",
- "multiThreaded",
+ CommonParams.MULTI_THREADED,
"true",
"timeAllowed",
"500"));
@@ -219,7 +220,7 @@ public class TestCpuAllowedLimit extends SolrCloudTestCase {
"prepare,process",
"cpuAllowed",
"100",
- "multiThreaded",
+ CommonParams.MULTI_THREADED,
"false"));
// System.err.println("rsp=" + rsp.jsonStr());
assertNotNull("should have partial results", rsp.getHeader().get("partialResults"));
@@ -238,7 +239,7 @@ public class TestCpuAllowedLimit extends SolrCloudTestCase {
"100",
"partialResults",
"false",
- "multiThreaded",
+ CommonParams.MULTI_THREADED,
"false",
"_",
"foo"));
@@ -261,7 +262,7 @@ public class TestCpuAllowedLimit extends SolrCloudTestCase {
"prepare,process",
"cpuAllowed",
"100",
- "multiThreaded",
+ CommonParams.MULTI_THREADED,
"true"));
// System.err.println("rsp=" + rsp.jsonStr());
assertNotNull("should have partial results", rsp.getHeader().get("partialResults"));
diff --git a/solr/core/src/test/org/apache/solr/search/TestDocSet.java b/solr/core/src/test/org/apache/solr/search/TestDocSet.java
index a554ce2f409..87ea053b545 100644
--- a/solr/core/src/test/org/apache/solr/search/TestDocSet.java
+++ b/solr/core/src/test/org/apache/solr/search/TestDocSet.java
@@ -24,6 +24,7 @@ import java.util.function.Supplier;
import java.util.function.ToIntFunction;
import org.apache.lucene.index.BinaryDocValues;
import org.apache.lucene.index.ByteVectorValues;
+import org.apache.lucene.index.DocValuesSkipper;
import org.apache.lucene.index.FieldInfos;
import org.apache.lucene.index.Fields;
import org.apache.lucene.index.FloatVectorValues;
@@ -302,7 +303,6 @@ public class TestDocSet extends SolrTestCase {
return maxDoc;
}
- @Override
@Deprecated
public Fields getTermVectors(int docID) {
return null;
@@ -358,6 +358,11 @@ public class TestDocSet extends SolrTestCase {
return null;
}
+ @Override
+ public DocValuesSkipper getDocValuesSkipper(String field) {
+ return null;
+ }
+
@Override
public NumericDocValues getNormValues(String field) {
return null;
@@ -394,7 +399,6 @@ public class TestDocSet extends SolrTestCase {
@Override
protected void doClose() {}
- @Override
@Deprecated
public void document(int doc, StoredFieldVisitor visitor) {}
diff --git a/solr/core/src/test/org/apache/solr/search/TestEarlyTerminatingQueries.java b/solr/core/src/test/org/apache/solr/search/TestEarlyTerminatingQueries.java
index e4f31b4c22c..10c3df9e474 100644
--- a/solr/core/src/test/org/apache/solr/search/TestEarlyTerminatingQueries.java
+++ b/solr/core/src/test/org/apache/solr/search/TestEarlyTerminatingQueries.java
@@ -22,6 +22,7 @@ import org.apache.solr.client.solrj.SolrClient;
import org.apache.solr.client.solrj.request.CollectionAdminRequest;
import org.apache.solr.client.solrj.response.QueryResponse;
import org.apache.solr.cloud.SolrCloudTestCase;
+import org.apache.solr.common.params.CommonParams;
import org.apache.solr.util.ThreadCpuTimer;
import org.junit.BeforeClass;
import org.junit.Test;
@@ -71,7 +72,7 @@ public class TestEarlyTerminatingQueries extends SolrCloudTestCase {
"5",
"rows",
"5",
- "multiThreaded",
+ CommonParams.MULTI_THREADED,
"false"));
assertEquals(
"should have partial results for maxHitsAllowed",
diff --git a/solr/core/src/test/org/apache/solr/search/TestExtendedDismaxParser.java b/solr/core/src/test/org/apache/solr/search/TestExtendedDismaxParser.java
index 71e9e426c59..21e3f30b654 100644
--- a/solr/core/src/test/org/apache/solr/search/TestExtendedDismaxParser.java
+++ b/solr/core/src/test/org/apache/solr/search/TestExtendedDismaxParser.java
@@ -3172,7 +3172,7 @@ public class TestExtendedDismaxParser extends SolrTestCaseJ4 {
private boolean containsClause(
BooleanQuery query, String field, String value, int boost, boolean fuzzy) {
for (BooleanClause clause : query) {
- if (containsClause(clause.getQuery(), field, value, boost, fuzzy)) {
+ if (containsClause(clause.query(), field, value, boost, fuzzy)) {
return true;
}
}
@@ -3285,13 +3285,13 @@ public class TestExtendedDismaxParser extends SolrTestCaseJ4 {
boolean rewrittenSubQ = false; // dirty flag: rebuild the repacked query?
BooleanQuery.Builder builder = newBooleanQuery();
for (BooleanClause clause : ((BooleanQuery) q).clauses()) {
- Query subQ = clause.getQuery();
+ Query subQ = clause.query();
if (subQ instanceof TermQuery) {
Term subTerm = ((TermQuery) subQ).getTerm();
if (frequentlyMisspelledWords.contains(subTerm.text())) {
rewrittenSubQ = true;
Query fuzzySubQ = newFuzzyQuery(subTerm, MIN_SIMILARITY, getFuzzyPrefixLength());
- clause = newBooleanClause(fuzzySubQ, clause.getOccur());
+ clause = newBooleanClause(fuzzySubQ, clause.occur());
}
}
builder.add(clause);
diff --git a/solr/core/src/test/org/apache/solr/search/TestFilteredDocIdSet.java b/solr/core/src/test/org/apache/solr/search/TestFilteredDocIdSet.java
index 153db65f0f7..87853b79484 100644
--- a/solr/core/src/test/org/apache/solr/search/TestFilteredDocIdSet.java
+++ b/solr/core/src/test/org/apache/solr/search/TestFilteredDocIdSet.java
@@ -33,7 +33,7 @@ import org.apache.lucene.search.MatchAllDocsQuery;
import org.apache.lucene.search.Query;
import org.apache.lucene.search.QueryVisitor;
import org.apache.lucene.search.ScoreMode;
-import org.apache.lucene.search.Scorer;
+import org.apache.lucene.search.ScorerSupplier;
import org.apache.lucene.search.Weight;
import org.apache.lucene.store.Directory;
import org.apache.lucene.tests.index.RandomIndexWriter;
@@ -125,7 +125,7 @@ public class TestFilteredDocIdSet extends SolrTestCase {
// First verify the document is searchable.
IndexSearcher searcher = newSearcher(reader);
- assertEquals(1, searcher.search(new MatchAllDocsQuery(), 10).totalHits.value);
+ assertEquals(1, searcher.search(new MatchAllDocsQuery(), 10).totalHits.value());
// Now search w/ a Query which returns a null Scorer
DocSetQuery f = new DocSetQuery(DocSet.empty());
@@ -135,7 +135,7 @@ public class TestFilteredDocIdSet extends SolrTestCase {
.add(new MatchAllDocsQuery(), Occur.MUST)
.add(f, Occur.FILTER)
.build();
- assertEquals(0, searcher.search(filtered, 10).totalHits.value);
+ assertEquals(0, searcher.search(filtered, 10).totalHits.value());
reader.close();
dir.close();
}
@@ -151,7 +151,7 @@ public class TestFilteredDocIdSet extends SolrTestCase {
// First verify the document is searchable.
IndexSearcher searcher = newSearcher(reader);
- assertEquals(1, searcher.search(new MatchAllDocsQuery(), 10).totalHits.value);
+ assertEquals(1, searcher.search(new MatchAllDocsQuery(), 10).totalHits.value());
// Now search w/ a Query which returns a null Scorer
Query f =
@@ -166,7 +166,7 @@ public class TestFilteredDocIdSet extends SolrTestCase {
}
@Override
- public Scorer scorer(LeafReaderContext leafReaderContext) {
+ public ScorerSupplier scorerSupplier(LeafReaderContext leafReaderContext) {
return null;
}
@@ -201,7 +201,7 @@ public class TestFilteredDocIdSet extends SolrTestCase {
.add(new MatchAllDocsQuery(), Occur.MUST)
.add(f, Occur.FILTER)
.build();
- assertEquals(0, searcher.search(filtered, 10).totalHits.value);
+ assertEquals(0, searcher.search(filtered, 10).totalHits.value());
reader.close();
dir.close();
}
diff --git a/solr/core/src/test/org/apache/solr/search/TestMaxScoreQueryParser.java b/solr/core/src/test/org/apache/solr/search/TestMaxScoreQueryParser.java
index 1fca65a53bf..6612be6ae04 100644
--- a/solr/core/src/test/org/apache/solr/search/TestMaxScoreQueryParser.java
+++ b/solr/core/src/test/org/apache/solr/search/TestMaxScoreQueryParser.java
@@ -88,10 +88,9 @@ public class TestMaxScoreQueryParser extends SolrTestCaseJ4 {
q = parse("foo bar");
clauses = clauses(q);
assertEquals(1, clauses.length);
- assertTrue(clauses[0].getQuery() instanceof DisjunctionMaxQuery);
- assertEquals(
- 0.0, ((DisjunctionMaxQuery) clauses[0].getQuery()).getTieBreakerMultiplier(), 1e-15);
- Collection<Query> qa = ((DisjunctionMaxQuery) clauses[0].getQuery()).getDisjuncts();
+ assertTrue(clauses[0].query() instanceof DisjunctionMaxQuery);
+ assertEquals(0.0, ((DisjunctionMaxQuery) clauses[0].query()).getTieBreakerMultiplier(), 1e-15);
+ Collection<Query> qa = ((DisjunctionMaxQuery) clauses[0].query()).getDisjuncts();
assertEquals(2, qa.size());
final Collection<String> qaStrings =
qa.stream().map(q -> q.toString()).collect(Collectors.toList());
@@ -103,9 +102,9 @@ public class TestMaxScoreQueryParser extends SolrTestCaseJ4 {
q = parse("foo bar -baz");
clauses = clauses(q);
assertEquals(2, clauses.length);
- assertTrue(clauses[0].getQuery() instanceof DisjunctionMaxQuery);
- assertTrue(clauses[1].getQuery() instanceof TermQuery);
- assertEquals("text:baz", clauses[1].getQuery().toString());
+ assertTrue(clauses[0].query() instanceof DisjunctionMaxQuery);
+ assertTrue(clauses[1].query() instanceof TermQuery);
+ assertEquals("text:baz", clauses[1].query().toString());
assertTrue(clauses[1].isProhibited());
}
@@ -114,9 +113,8 @@ public class TestMaxScoreQueryParser extends SolrTestCaseJ4 {
q = parse("foo bar", "tie", "0.5");
clauses = clauses(q);
assertEquals(1, clauses.length);
- assertTrue(clauses[0].getQuery() instanceof DisjunctionMaxQuery);
- assertEquals(
- 0.5, ((DisjunctionMaxQuery) clauses[0].getQuery()).getTieBreakerMultiplier(), 1e-15);
+ assertTrue(clauses[0].query() instanceof DisjunctionMaxQuery);
+ assertEquals(0.5, ((DisjunctionMaxQuery) clauses[0].query()).getTieBreakerMultiplier(), 1e-15);
}
@Test
@@ -130,8 +128,8 @@ public class TestMaxScoreQueryParser extends SolrTestCaseJ4 {
q = parse("foo^5.0 bar^6.0 +baz^7");
clauses = clauses(q);
assertEquals(2, clauses.length);
- assertTrue(clauses[0].getQuery() instanceof DisjunctionMaxQuery);
- DisjunctionMaxQuery dmq = ((DisjunctionMaxQuery) clauses[0].getQuery());
+ assertTrue(clauses[0].query() instanceof DisjunctionMaxQuery);
+ DisjunctionMaxQuery dmq = ((DisjunctionMaxQuery) clauses[0].query());
Query fooClause =
((BooleanQuery)
dmq.getDisjuncts().stream()
@@ -141,7 +139,7 @@ public class TestMaxScoreQueryParser extends SolrTestCaseJ4 {
.clauses()
.iterator()
.next()
- .getQuery();
+ .query();
assertEquals(5.0, ((BoostQuery) fooClause).getBoost(), 1e-15);
Query barClause =
((BooleanQuery)
@@ -152,17 +150,17 @@ public class TestMaxScoreQueryParser extends SolrTestCaseJ4 {
.clauses()
.iterator()
.next()
- .getQuery();
+ .query();
assertEquals(6.0, ((BoostQuery) barClause).getBoost(), 1e-15);
- assertEquals(7.0, ((BoostQuery) clauses[1].getQuery()).getBoost(), 1e-15);
+ assertEquals(7.0, ((BoostQuery) clauses[1].query()).getBoost(), 1e-15);
assertFalse(q instanceof BoostQuery);
// Grouped with parens on top level
q = parse("(foo^2.0 bar)^3.0");
clauses = clauses(q);
assertEquals(1, clauses.length);
- assertTrue(clauses[0].getQuery() instanceof DisjunctionMaxQuery);
- dmq = ((DisjunctionMaxQuery) clauses[0].getQuery());
+ assertTrue(clauses[0].query() instanceof DisjunctionMaxQuery);
+ dmq = ((DisjunctionMaxQuery) clauses[0].query());
fooClause =
((BooleanQuery)
dmq.getDisjuncts().stream()
@@ -172,7 +170,7 @@ public class TestMaxScoreQueryParser extends SolrTestCaseJ4 {
.clauses()
.iterator()
.next()
- .getQuery();
+ .query();
assertEquals(2.0, ((BoostQuery) fooClause).getBoost(), 1e-15);
barClause =
((BooleanQuery)
@@ -183,7 +181,7 @@ public class TestMaxScoreQueryParser extends SolrTestCaseJ4 {
.clauses()
.iterator()
.next()
- .getQuery();
+ .query();
assertFalse(barClause instanceof BoostQuery);
assertEquals(3.0, ((BoostQuery) q).getBoost(), 1e-15);
}
diff --git a/solr/core/src/test/org/apache/solr/search/TestMemAllowedLimit.java b/solr/core/src/test/org/apache/solr/search/TestMemAllowedLimit.java
index 533054dca0f..fd8bc761b8b 100644
--- a/solr/core/src/test/org/apache/solr/search/TestMemAllowedLimit.java
+++ b/solr/core/src/test/org/apache/solr/search/TestMemAllowedLimit.java
@@ -25,6 +25,7 @@ import org.apache.solr.client.solrj.SolrClient;
import org.apache.solr.client.solrj.request.CollectionAdminRequest;
import org.apache.solr.client.solrj.response.QueryResponse;
import org.apache.solr.cloud.SolrCloudTestCase;
+import org.apache.solr.common.params.CommonParams;
import org.apache.solr.index.NoMergePolicyFactory;
import org.apache.solr.util.LogLevel;
import org.apache.solr.util.TestInjection;
@@ -185,7 +186,7 @@ public class TestMemAllowedLimit extends SolrCloudTestCase {
String.valueOf(dataSize),
"stages",
"prepare,process",
- "multiThreaded",
+ CommonParams.MULTI_THREADED,
"true",
"memAllowed",
"0.2"));
diff --git a/solr/core/src/test/org/apache/solr/search/TestMinHashQParser.java b/solr/core/src/test/org/apache/solr/search/TestMinHashQParser.java
index c4de4612bb7..6bf447ec7bc 100644
--- a/solr/core/src/test/org/apache/solr/search/TestMinHashQParser.java
+++ b/solr/core/src/test/org/apache/solr/search/TestMinHashQParser.java
@@ -426,7 +426,7 @@ public class TestMinHashQParser extends SolrTestCaseJ4 {
assertEquals(4, bq.clauses().size());
for (BooleanClause clause : bq.clauses()) {
assertEquals(
- 3, ((BooleanQuery) ((ConstantScoreQuery) clause.getQuery()).getQuery()).clauses().size());
+ 3, ((BooleanQuery) ((ConstantScoreQuery) clause.query()).getQuery()).clauses().size());
}
}
diff --git a/solr/core/src/test/org/apache/solr/search/TestQueryLimits.java b/solr/core/src/test/org/apache/solr/search/TestQueryLimits.java
index 01d7447c181..a8f80f9efaf 100644
--- a/solr/core/src/test/org/apache/solr/search/TestQueryLimits.java
+++ b/solr/core/src/test/org/apache/solr/search/TestQueryLimits.java
@@ -22,6 +22,7 @@ import org.apache.solr.client.solrj.SolrClient;
import org.apache.solr.client.solrj.request.CollectionAdminRequest;
import org.apache.solr.client.solrj.response.QueryResponse;
import org.apache.solr.cloud.SolrCloudTestCase;
+import org.apache.solr.common.params.CommonParams;
import org.apache.solr.util.TestInjection;
import org.apache.solr.util.ThreadCpuTimer;
import org.junit.BeforeClass;
@@ -84,7 +85,7 @@ public class TestQueryLimits extends SolrCloudTestCase {
"true",
"facet.field",
"val_i",
- "multiThreaded",
+ CommonParams.MULTI_THREADED,
"false"));
assertNotNull(
"should have partial results for expr " + matchingExpr,
diff --git a/solr/core/src/test/org/apache/solr/search/TestSolrCoreParser.java b/solr/core/src/test/org/apache/solr/search/TestSolrCoreParser.java
index ac080b5e686..16708747fc7 100644
--- a/solr/core/src/test/org/apache/solr/search/TestSolrCoreParser.java
+++ b/solr/core/src/test/org/apache/solr/search/TestSolrCoreParser.java
@@ -123,8 +123,8 @@ public class TestSolrCoreParser extends SolrTestCaseJ4 {
assertTrue(query instanceof BooleanQuery);
final BooleanQuery bq = (BooleanQuery) query;
assertEquals(2, bq.clauses().size());
- assertTrue(bq.clauses().get(0).getQuery() instanceof MatchAllDocsQuery);
- assertTrue(bq.clauses().get(1).getQuery() instanceof MatchNoDocsQuery);
+ assertTrue(bq.clauses().get(0).query() instanceof MatchAllDocsQuery);
+ assertTrue(bq.clauses().get(1).query() instanceof MatchNoDocsQuery);
}
// test custom query (HandyQueryBuilder) wrapping a SpanQuery
@@ -144,7 +144,7 @@ public class TestSolrCoreParser extends SolrTestCaseJ4 {
final BooleanQuery bq = (BooleanQuery) query;
assertEquals(2, bq.clauses().size());
for (int ii = 0; ii < bq.clauses().size(); ++ii) {
- final Query clauseQuery = bq.clauses().get(ii).getQuery();
+ final Query clauseQuery = bq.clauses().get(ii).query();
switch (ii) {
case 0:
assertTrue(clauseQuery instanceof SpanOrQuery);
@@ -204,8 +204,8 @@ public class TestSolrCoreParser extends SolrTestCaseJ4 {
assertTrue(query instanceof BooleanQuery);
final BooleanQuery bq = (BooleanQuery) query;
assertEquals(2, bq.clauses().size());
- checkChooseOneWordQuery(span, bq.clauses().get(0).getQuery(), fieldName, randomTerms);
- checkApacheLuceneSolr(bq.clauses().get(1).getQuery(), fieldName);
+ checkChooseOneWordQuery(span, bq.clauses().get(0).query(), fieldName, randomTerms);
+ checkApacheLuceneSolr(bq.clauses().get(1).query(), fieldName);
}
}
diff --git a/solr/core/src/test/org/apache/solr/search/TestSolrQueryParser.java b/solr/core/src/test/org/apache/solr/search/TestSolrQueryParser.java
index d38207e38ba..f38696c7914 100644
--- a/solr/core/src/test/org/apache/solr/search/TestSolrQueryParser.java
+++ b/solr/core/src/test/org/apache/solr/search/TestSolrQueryParser.java
@@ -35,10 +35,9 @@ import org.apache.lucene.search.BooleanClause;
import org.apache.lucene.search.BooleanQuery;
import org.apache.lucene.search.BoostQuery;
import org.apache.lucene.search.ConstantScoreQuery;
-import org.apache.lucene.search.DocValuesFieldExistsQuery;
+import org.apache.lucene.search.FieldExistsQuery;
import org.apache.lucene.search.IndexOrDocValuesQuery;
import org.apache.lucene.search.IndexSearcher;
-import org.apache.lucene.search.NormsFieldExistsQuery;
import org.apache.lucene.search.PointInSetQuery;
import org.apache.lucene.search.Query;
import org.apache.lucene.search.TermInSetQuery;
@@ -372,7 +371,7 @@ public class TestSolrQueryParser extends SolrTestCaseJ4 {
qParser.setIsFilter(true); // this may change in the future
qParser.setParams(params);
q = qParser.getQuery();
- assertEquals(26, ((TermInSetQuery) q).getTermData().size());
+ assertEquals(26, ((TermInSetQuery) q).getTermsCount());
// large numeric filter query should use TermsQuery
qParser =
@@ -400,7 +399,7 @@ public class TestSolrQueryParser extends SolrTestCaseJ4 {
((PointInSetQuery) q).getPackedPoints().size());
}
} else {
- assertEquals(20, ((TermInSetQuery) q).getTermData().size());
+ assertEquals(20, ((TermInSetQuery) q).getTermsCount());
}
// for point fields large filter query should use PointInSetQuery
@@ -426,16 +425,16 @@ public class TestSolrQueryParser extends SolrTestCaseJ4 {
qParser.setParams(params);
q = qParser.getQuery();
assertEquals(2, ((BooleanQuery) q).clauses().size());
- qq = ((BooleanQuery) q).clauses().get(0).getQuery();
+ qq = ((BooleanQuery) q).clauses().get(0).query();
if (qq instanceof TermQuery) {
- qq = ((BooleanQuery) q).clauses().get(1).getQuery();
+ qq = ((BooleanQuery) q).clauses().get(1).query();
}
if (qq instanceof FilterQuery) {
qq = ((FilterQuery) qq).getQuery();
}
- assertEquals(26, ((TermInSetQuery) qq).getTermData().size());
+ assertEquals(26, ((TermInSetQuery) qq).getTermsCount());
// test mixed boolean query, including quotes (which shouldn't matter)
qParser =
@@ -448,10 +447,10 @@ public class TestSolrQueryParser extends SolrTestCaseJ4 {
assertEquals(4, ((BooleanQuery) q).clauses().size());
qq = null;
for (BooleanClause clause : ((BooleanQuery) q).clauses()) {
- qq = clause.getQuery();
+ qq = clause.query();
if (qq instanceof TermInSetQuery) break;
}
- assertEquals(26, ((TermInSetQuery) qq).getTermData().size());
+ assertEquals(26, ((TermInSetQuery) qq).getTermsCount());
// test terms queries of two different fields (LUCENE-7637 changed to require all terms be in
// the same field)
@@ -466,8 +465,8 @@ public class TestSolrQueryParser extends SolrTestCaseJ4 {
q = qParser.getQuery();
assertEquals(2, ((BooleanQuery) q).clauses().size());
for (BooleanClause clause : ((BooleanQuery) q).clauses()) {
- qq = clause.getQuery();
- assertEquals(17, ((TermInSetQuery) qq).getTermData().size());
+ qq = clause.query();
+ assertEquals(17, ((TermInSetQuery) qq).getTermsCount());
}
}
req.close();
@@ -481,7 +480,7 @@ public class TestSolrQueryParser extends SolrTestCaseJ4 {
// even though it's not long enough to trip the Lucene level (global) limit
final String too_long = "id:(" + a + a + a + a + a + ")";
- final String expectedMsg = "Too many clauses";
+ final String expectedMsg = "too many boolean clauses";
ignoreException(expectedMsg);
SolrException e =
expectThrows(
@@ -508,7 +507,7 @@ public class TestSolrQueryParser extends SolrTestCaseJ4 {
sb.append(a);
sb.append(")");
- // this should trip the lucene level global BooleanQuery.getMaxClauseCount() limit,
+ // this should trip the lucene level global IndexSearcher.getMaxClauseCount() limit,
// causing a parsing error, before Solr even gets a chance to enforce its lower level limit
final String way_too_long = sb.toString();
@@ -1809,13 +1808,8 @@ public class TestSolrQueryParser extends SolrTestCaseJ4 {
assertFalse(
"For float and double fields \""
+ query
- + "\" is not an existence query, so the query returned should not be a DocValuesFieldExistsQuery.",
- createdQuery instanceof DocValuesFieldExistsQuery);
- assertFalse(
- "For float and double fields \""
- + query
- + "\" is not an existence query, so the query returned should not be a NormsFieldExistsQuery.",
- createdQuery instanceof NormsFieldExistsQuery);
+ + "\" is not an existence query, so the query returned should not be a FieldExistsQuery.",
+ createdQuery instanceof FieldExistsQuery);
assertFalse(
"For float and double fields \""
+ query
@@ -1831,8 +1825,8 @@ public class TestSolrQueryParser extends SolrTestCaseJ4 {
assertTrue(
"Field has docValues, so existence query \""
+ query
- + "\" should return DocValuesFieldExistsQuery",
- createdQuery instanceof DocValuesFieldExistsQuery);
+ + "\" should return FieldExistsQuery",
+ createdQuery instanceof FieldExistsQuery);
} else if (!schemaField.omitNorms()
&& !schemaField
.getType()
@@ -1840,8 +1834,8 @@ public class TestSolrQueryParser extends SolrTestCaseJ4 {
assertTrue(
"Field has norms and no docValues, so existence query \""
+ query
- + "\" should return NormsFieldExistsQuery",
- createdQuery instanceof NormsFieldExistsQuery);
+ + "\" should return FieldExistsQuery",
+ createdQuery instanceof FieldExistsQuery);
} else if (schemaField.getType().getNumberType() == NumberType.DOUBLE
|| schemaField.getType().getNumberType() == NumberType.FLOAT) {
assertTrue(
@@ -1869,15 +1863,10 @@ public class TestSolrQueryParser extends SolrTestCaseJ4 {
((BooleanQuery) ((ConstantScoreQuery) createdQuery).getQuery()).clauses().size());
} else {
assertFalse(
- "Field doesn't have docValues, so existence query \""
- + query
- + "\" should not return DocValuesFieldExistsQuery",
- createdQuery instanceof DocValuesFieldExistsQuery);
- assertFalse(
- "Field doesn't have norms, so existence query \""
+ "Field doesn't have docValues or norms, so existence query \""
+ query
- + "\" should not return NormsFieldExistsQuery",
- createdQuery instanceof NormsFieldExistsQuery);
+ + "\" should not return FieldExistsQuery",
+ createdQuery instanceof FieldExistsQuery);
}
}
}
diff --git a/solr/core/src/test/org/apache/solr/search/TestSort.java b/solr/core/src/test/org/apache/solr/search/TestSort.java
index a13b1b1081a..9677ef38626 100644
--- a/solr/core/src/test/org/apache/solr/search/TestSort.java
+++ b/solr/core/src/test/org/apache/solr/search/TestSort.java
@@ -42,12 +42,13 @@ import org.apache.lucene.search.Query;
import org.apache.lucene.search.QueryVisitor;
import org.apache.lucene.search.ScoreDoc;
import org.apache.lucene.search.ScoreMode;
-import org.apache.lucene.search.Scorer;
+import org.apache.lucene.search.ScorerSupplier;
import org.apache.lucene.search.Sort;
import org.apache.lucene.search.SortField;
import org.apache.lucene.search.SortField.Type;
import org.apache.lucene.search.TopDocs;
import org.apache.lucene.search.TopFieldCollector;
+import org.apache.lucene.search.TopFieldCollectorManager;
import org.apache.lucene.search.Weight;
import org.apache.lucene.store.ByteBuffersDirectory;
import org.apache.lucene.store.Directory;
@@ -258,7 +259,7 @@ public class TestSort extends SolrTestCaseJ4 {
}
@Override
- public Scorer scorer(LeafReaderContext leafReaderContext) {
+ public ScorerSupplier scorerSupplier(LeafReaderContext leafReaderContext) {
return null;
}
@@ -323,7 +324,7 @@ public class TestSort extends SolrTestCaseJ4 {
: "zzz";
final TopFieldCollector topCollector =
- TopFieldCollector.create(sort, top, Integer.MAX_VALUE);
+ new TopFieldCollectorManager(sort, top, Integer.MAX_VALUE).newCollector();
final List<MyDoc> collectedDocs = new ArrayList<>();
// delegate and collect docs ourselves
@@ -343,6 +344,7 @@ public class TestSort extends SolrTestCaseJ4 {
}
};
+ // Use deprecated search method for non-parallel search testing
searcher.search(query, myCollector);
collectedDocs.sort(
diff --git a/solr/core/src/test/org/apache/solr/search/function/TestOrdValues.java b/solr/core/src/test/org/apache/solr/search/function/TestOrdValues.java
index 4081fc3b671..e0682518a5e 100644
--- a/solr/core/src/test/org/apache/solr/search/function/TestOrdValues.java
+++ b/solr/core/src/test/org/apache/solr/search/function/TestOrdValues.java
@@ -97,7 +97,7 @@ public class TestOrdValues extends SolrTestCase {
: "IC"; // smaller than all ids of docs in this test ("ID0001", etc.)
for (int i = 0; i < h.length; i++) {
- String resID = s.doc(h[i].doc).get(ID_FIELD);
+ String resID = s.storedFields().document(h[i].doc).get(ID_FIELD);
log(i + ". score=" + h[i].score + " - " + resID);
log(s.explain(q, h[i].doc));
if (inOrder) {
@@ -136,7 +136,7 @@ public class TestOrdValues extends SolrTestCase {
}
Query q = new FunctionQuery(vs);
TopDocs td = s.search(q, 1000);
- assertEquals("All docs should be matched!", N_DOCS, td.totalHits.value);
+ assertEquals("All docs should be matched!", N_DOCS, td.totalHits.value());
ScoreDoc sd[] = td.scoreDocs;
StoredFields storedFields = s.getIndexReader().storedFields();
for (int i = 0; i < sd.length; i++) {
diff --git a/solr/core/src/test/org/apache/solr/search/join/BJQParserTest.java b/solr/core/src/test/org/apache/solr/search/join/BJQParserTest.java
index 5fcb7455187..62ab2528709 100644
--- a/solr/core/src/test/org/apache/solr/search/join/BJQParserTest.java
+++ b/solr/core/src/test/org/apache/solr/search/join/BJQParserTest.java
@@ -642,7 +642,7 @@ public class BJQParserTest extends SolrTestCaseJ4 {
QParser parser = QParser.getParser(req.getParams().get("q"), null, req);
query = parser.getQuery();
final TopDocs topDocs = req.getSearcher().search(query, 10);
- assertEquals(1, topDocs.totalHits.value);
+ assertEquals(1, topDocs.totalHits.value());
}
assertU(adoc("id", "12275", "child_s", "l", "childparent_s", "e"));
assertU(commit());
diff --git a/solr/core/src/test/org/apache/solr/search/join/TestScoreJoinQPNoScore.java b/solr/core/src/test/org/apache/solr/search/join/TestScoreJoinQPNoScore.java
index 0d4bb489fd8..ceb27a4ed44 100644
--- a/solr/core/src/test/org/apache/solr/search/join/TestScoreJoinQPNoScore.java
+++ b/solr/core/src/test/org/apache/solr/search/join/TestScoreJoinQPNoScore.java
@@ -221,7 +221,7 @@ public class TestScoreJoinQPNoScore extends SolrTestCaseJ4 {
{
final Query query = QParser.getParser(req.getParams().get("q"), req).getQuery();
- final Query rewrittenQuery = query.rewrite(req.getSearcher().getIndexReader());
+ final Query rewrittenQuery = query.rewrite(req.getSearcher());
assertEquals(
rewrittenQuery + " is expected to be from Solr",
ScoreJoinQParserPlugin.class.getPackage().getName(),
@@ -230,7 +230,7 @@ public class TestScoreJoinQPNoScore extends SolrTestCaseJ4 {
{
final Query query =
QParser.getParser("{!join from=dept_id_s to=dept_ss}text_t:develop", req).getQuery();
- final Query rewrittenQuery = query.rewrite(req.getSearcher().getIndexReader());
+ final Query rewrittenQuery = query.rewrite(req.getSearcher());
assertEquals(
rewrittenQuery + " is expected to be from Solr",
JoinQParserPlugin.class.getPackage().getName(),
diff --git a/solr/core/src/test/org/apache/solr/search/join/TestScoreJoinQPScore.java b/solr/core/src/test/org/apache/solr/search/join/TestScoreJoinQPScore.java
index 3928d001b16..fc47534bc13 100644
--- a/solr/core/src/test/org/apache/solr/search/join/TestScoreJoinQPScore.java
+++ b/solr/core/src/test/org/apache/solr/search/join/TestScoreJoinQPScore.java
@@ -216,9 +216,7 @@ public class TestScoreJoinQPScore extends SolrTestCaseJ4 {
"true");
SolrRequestInfo.setRequestInfo(new SolrRequestInfo(req, new SolrQueryResponse()));
final Query luceneQ =
- QParser.getParser(req.getParams().get("q"), req)
- .getQuery()
- .rewrite(req.getSearcher().getSlowAtomicReader());
+ QParser.getParser(req.getParams().get("q"), req).getQuery().rewrite(req.getSearcher());
assertTrue(luceneQ instanceof BoostQuery);
float boost = ((BoostQuery) luceneQ).getBoost();
assertEquals("" + luceneQ, Float.floatToIntBits(200), Float.floatToIntBits(boost));
diff --git a/solr/core/src/test/org/apache/solr/search/join/another/BJQFilterAccessibleTest.java b/solr/core/src/test/org/apache/solr/search/join/another/BJQFilterAccessibleTest.java
index 973bfee6c69..fababdf60c9 100644
--- a/solr/core/src/test/org/apache/solr/search/join/another/BJQFilterAccessibleTest.java
+++ b/solr/core/src/test/org/apache/solr/search/join/another/BJQFilterAccessibleTest.java
@@ -24,6 +24,8 @@ import org.apache.lucene.index.Term;
import org.apache.lucene.search.Query;
import org.apache.lucene.search.TermQuery;
import org.apache.lucene.search.WildcardQuery;
+import org.apache.lucene.search.MultiTermQuery;
+import org.apache.lucene.util.automaton.Operations;
import org.apache.lucene.search.join.ScoreMode;
import org.apache.lucene.search.join.ToParentBlockJoinQuery;
import org.apache.solr.SolrTestCaseJ4;
@@ -48,13 +50,17 @@ public class BJQFilterAccessibleTest extends SolrTestCaseJ4 {
public void testAbilityToCreateBJQfromAnotherPackage() throws IOException {
try (SolrQueryRequest req = lrf.makeRequest()) {
TermQuery childQuery = new TermQuery(new Term("child_s", "l"));
- Query parentQuery = new WildcardQuery(new Term("parent_s", "*"));
+ Query parentQuery =
+ new WildcardQuery(
+ new Term("parent_s", "*"),
+ Operations.DEFAULT_DETERMINIZE_WORK_LIMIT,
+ MultiTermQuery.CONSTANT_SCORE_REWRITE);
ToParentBlockJoinQuery tpbjq =
new ToParentBlockJoinQuery(
childQuery,
BlockJoinParentQParser.getCachedBitSetProducer(req, parentQuery),
ScoreMode.Max);
- assertEquals(6, req.getSearcher().search(tpbjq, 10).totalHits.value);
+ assertEquals(6, req.getSearcher().search(tpbjq, 10).totalHits.value());
}
}
}
diff --git a/solr/core/src/test/org/apache/solr/uninverting/TestDocTermOrds.java b/solr/core/src/test/org/apache/solr/uninverting/TestDocTermOrds.java
index 573d2e5dd19..c352890e424 100644
--- a/solr/core/src/test/org/apache/solr/uninverting/TestDocTermOrds.java
+++ b/solr/core/src/test/org/apache/solr/uninverting/TestDocTermOrds.java
@@ -120,21 +120,24 @@ public class TestDocTermOrds extends SolrTestCase {
SortedSetDocValues iter = dto.iterator(ar);
assertEquals(0, iter.nextDoc());
+ long docValueCount = iter.docValueCount();
+ assertEquals(3, docValueCount);
assertEquals(0, iter.nextOrd());
assertEquals(1, iter.nextOrd());
assertEquals(2, iter.nextOrd());
- assertEquals(SortedSetDocValues.NO_MORE_ORDS, iter.nextOrd());
assertEquals(1, iter.nextDoc());
+ docValueCount = iter.docValueCount();
+ assertEquals(3, docValueCount);
assertEquals(3, iter.nextOrd());
assertEquals(4, iter.nextOrd());
assertEquals(5, iter.nextOrd());
- assertEquals(SortedSetDocValues.NO_MORE_ORDS, iter.nextOrd());
assertEquals(2, iter.nextDoc());
+ docValueCount = iter.docValueCount();
+ assertEquals(2, docValueCount);
assertEquals(0, iter.nextOrd());
assertEquals(5, iter.nextOrd());
- assertEquals(SortedSetDocValues.NO_MORE_ORDS, iter.nextOrd());
r.close();
dir.close();
@@ -438,8 +441,9 @@ public class TestDocTermOrds extends SolrTestCase {
}
final int[] answers = idToOrds[(int) docIDToID.longValue()];
int upto = 0;
- long ord;
- while ((ord = iter.nextOrd()) != SortedSetDocValues.NO_MORE_ORDS) {
+ long docValueCount = iter.docValueCount();
+ for (int i = 0; i < docValueCount; i++) {
+ long ord = iter.nextOrd();
te.seekExact(ord);
final BytesRef expected = termsArray[answers[upto++]];
if (VERBOSE) {
@@ -518,13 +522,15 @@ public class TestDocTermOrds extends SolrTestCase {
assertEquals(2, v.getValueCount());
assertEquals(0, v.nextDoc());
+ long docValueCount = v.docValueCount();
+ assertEquals(1, docValueCount);
assertEquals(1, v.nextOrd());
- assertEquals(SortedSetDocValues.NO_MORE_ORDS, v.nextOrd());
assertEquals(1, v.nextDoc());
+ docValueCount = v.docValueCount();
+ assertEquals(2, docValueCount);
assertEquals(0, v.nextOrd());
assertEquals(1, v.nextOrd());
- assertEquals(SortedSetDocValues.NO_MORE_ORDS, v.nextOrd());
BytesRef value = v.lookupOrd(0);
assertEquals(-3, LegacyNumericUtils.prefixCodedToInt(value));
@@ -562,13 +568,15 @@ public class TestDocTermOrds extends SolrTestCase {
assertEquals(2, v.getValueCount());
assertEquals(0, v.nextDoc());
+ long docValueCount = v.docValueCount();
+ assertEquals(1, docValueCount);
assertEquals(1, v.nextOrd());
- assertEquals(SortedSetDocValues.NO_MORE_ORDS, v.nextOrd());
assertEquals(1, v.nextDoc());
+ docValueCount = v.docValueCount();
+ assertEquals(2, docValueCount);
assertEquals(0, v.nextOrd());
assertEquals(1, v.nextOrd());
- assertEquals(SortedSetDocValues.NO_MORE_ORDS, v.nextOrd());
BytesRef value = v.lookupOrd(0);
assertEquals(-3, LegacyNumericUtils.prefixCodedToLong(value));
@@ -697,16 +705,19 @@ public class TestDocTermOrds extends SolrTestCase {
assertEquals(2, v.getValueCount());
assertEquals(0, v.nextDoc());
+ long docValueCount = v.docValueCount();
+ assertEquals(1, docValueCount);
assertEquals(0, v.nextOrd());
- assertEquals(SortedSetDocValues.NO_MORE_ORDS, v.nextOrd());
assertEquals(1, v.nextDoc());
+ docValueCount = v.docValueCount();
+ assertEquals(1, docValueCount);
assertEquals(1, v.nextOrd());
- assertEquals(SortedSetDocValues.NO_MORE_ORDS, v.nextOrd());
assertEquals(3, v.nextDoc());
+ docValueCount = v.docValueCount();
+ assertEquals(1, docValueCount);
assertEquals(1, v.nextOrd());
- assertEquals(SortedSetDocValues.NO_MORE_ORDS, v.nextOrd());
BytesRef value = v.lookupOrd(0);
assertEquals("bar", value.utf8ToString());
diff --git a/solr/core/src/test/org/apache/solr/uninverting/TestFieldCache.java b/solr/core/src/test/org/apache/solr/uninverting/TestFieldCache.java
index efbfa28b268..b234ccfbff5 100644
--- a/solr/core/src/test/org/apache/solr/uninverting/TestFieldCache.java
+++ b/solr/core/src/test/org/apache/solr/uninverting/TestFieldCache.java
@@ -272,21 +272,40 @@ public class TestFieldCache extends SolrTestCase {
for (int i = 0; i < NUM_DOCS; i++) {
// This will remove identical terms. A DocTermOrds doesn't return duplicate ords for a docId
List<BytesRef> values = new ArrayList<>(new LinkedHashSet<>(Arrays.asList(multiValued[i])));
+
+ // Count expected non-null values
+ int expectedValueCount = 0;
for (BytesRef v : values) {
if (v == null) {
- // why does this test use null values... instead of an empty list: confusing
break;
}
- if (i > termOrds.docID()) {
- assertEquals(i, termOrds.nextDoc());
- }
- long ord = termOrds.nextOrd();
- assertNotEquals(ord, SortedSetDocValues.NO_MORE_ORDS);
- BytesRef scratch = termOrds.lookupOrd(ord);
- assertEquals(v, scratch);
+ expectedValueCount++;
+ }
+
+ // Advance to document i if needed
+ if (termOrds.docID() < i) {
+ termOrds.advance(i);
}
- if (i == termOrds.docID()) {
- assertEquals(SortedSetDocValues.NO_MORE_ORDS, termOrds.nextOrd());
+
+ // Check if document i has values
+ if (termOrds.docID() == i) {
+ // Document has values - verify count and content
+ long docValueCount = termOrds.docValueCount();
+ assertEquals("Document " + i + " value count mismatch", expectedValueCount, docValueCount);
+
+ int valueIndex = 0;
+ for (int ordIdx = 0; ordIdx < docValueCount; ordIdx++) {
+ long ord = termOrds.nextOrd();
+ BytesRef scratch = termOrds.lookupOrd(ord);
+ // Find the corresponding value (skip nulls)
+ while (valueIndex < values.size() && values.get(valueIndex) == null) {
+ valueIndex++;
+ }
+ if (valueIndex < values.size()) {
+ assertEquals(values.get(valueIndex), scratch);
+ valueIndex++;
+ }
+ }
}
}
@@ -500,8 +519,8 @@ public class TestFieldCache extends SolrTestCase {
SortedSetDocValues sortedSet = FieldCache.DEFAULT.getDocTermOrds(ar, "sorted", null);
assertEquals(0, sortedSet.nextDoc());
+ assertEquals(1, sortedSet.docValueCount());
assertEquals(0, sortedSet.nextOrd());
- assertEquals(SortedSetDocValues.NO_MORE_ORDS, sortedSet.nextOrd());
assertEquals(1, sortedSet.getValueCount());
bits = FieldCache.DEFAULT.getDocsWithField(ar, "sorted", null);
@@ -567,9 +586,9 @@ public class TestFieldCache extends SolrTestCase {
sortedSet = FieldCache.DEFAULT.getDocTermOrds(ar, "sortedset", null);
assertEquals(0, sortedSet.nextDoc());
+ assertEquals(2, sortedSet.docValueCount());
assertEquals(0, sortedSet.nextOrd());
assertEquals(1, sortedSet.nextOrd());
- assertEquals(SortedSetDocValues.NO_MORE_ORDS, sortedSet.nextOrd());
assertEquals(2, sortedSet.getValueCount());
bits = FieldCache.DEFAULT.getDocsWithField(ar, "sortedset", null);
diff --git a/solr/core/src/test/org/apache/solr/uninverting/TestFieldCacheSort.java b/solr/core/src/test/org/apache/solr/uninverting/TestFieldCacheSort.java
index 2e357105079..31267a9be62 100644
--- a/solr/core/src/test/org/apache/solr/uninverting/TestFieldCacheSort.java
+++ b/solr/core/src/test/org/apache/solr/uninverting/TestFieldCacheSort.java
@@ -88,7 +88,7 @@ public class TestFieldCacheSort extends SolrTestCase {
Sort sort = new Sort(new SortField("value", sortType));
TopDocs td = searcher.search(new MatchAllDocsQuery(), 10, sort);
- assertEquals(2, td.totalHits.value);
+ assertEquals(2, td.totalHits.value());
// 'bar' comes before 'foo'
assertEquals("bar", searcher.storedFields().document(td.scoreDocs[0].doc).get("value"));
assertEquals("foo", searcher.storedFields().document(td.scoreDocs[1].doc).get("value"));
@@ -127,7 +127,7 @@ public class TestFieldCacheSort extends SolrTestCase {
Sort sort = new Sort(new SortField("value", sortType));
TopDocs td = searcher.search(new MatchAllDocsQuery(), 10, sort);
- assertEquals(3, td.totalHits.value);
+ assertEquals(3, td.totalHits.value());
// null comes first
assertNull(searcher.storedFields().document(td.scoreDocs[0].doc).get("value"));
assertEquals("bar", searcher.storedFields().document(td.scoreDocs[1].doc).get("value"));
@@ -164,7 +164,7 @@ public class TestFieldCacheSort extends SolrTestCase {
Sort sort = new Sort(new SortField("value", sortType, true));
TopDocs td = searcher.search(new MatchAllDocsQuery(), 10, sort);
- assertEquals(2, td.totalHits.value);
+ assertEquals(2, td.totalHits.value());
// 'foo' comes after 'bar' in reverse order
assertEquals("foo", searcher.storedFields().document(td.scoreDocs[0].doc).get("value"));
assertEquals("bar", searcher.storedFields().document(td.scoreDocs[1].doc).get("value"));
@@ -203,7 +203,7 @@ public class TestFieldCacheSort extends SolrTestCase {
Sort sort = new Sort(sf);
TopDocs td = searcher.search(new MatchAllDocsQuery(), 10, sort);
- assertEquals(3, td.totalHits.value);
+ assertEquals(3, td.totalHits.value());
// null comes first
assertNull(searcher.storedFields().document(td.scoreDocs[0].doc).get("value"));
assertEquals("bar", searcher.storedFields().document(td.scoreDocs[1].doc).get("value"));
@@ -243,7 +243,7 @@ public class TestFieldCacheSort extends SolrTestCase {
Sort sort = new Sort(sf);
TopDocs td = searcher.search(new MatchAllDocsQuery(), 10, sort);
- assertEquals(3, td.totalHits.value);
+ assertEquals(3, td.totalHits.value());
assertEquals("foo", searcher.storedFields().document(td.scoreDocs[0].doc).get("value"));
assertEquals("bar", searcher.storedFields().document(td.scoreDocs[1].doc).get("value"));
// null comes last
@@ -284,7 +284,7 @@ public class TestFieldCacheSort extends SolrTestCase {
Sort sort = new Sort(sf);
TopDocs td = searcher.search(new MatchAllDocsQuery(), 10, sort);
- assertEquals(3, td.totalHits.value);
+ assertEquals(3, td.totalHits.value());
assertEquals("bar", searcher.storedFields().document(td.scoreDocs[0].doc).get("value"));
assertEquals("foo", searcher.storedFields().document(td.scoreDocs[1].doc).get("value"));
// null comes last
@@ -325,7 +325,7 @@ public class TestFieldCacheSort extends SolrTestCase {
Sort sort = new Sort(sf);
TopDocs td = searcher.search(new MatchAllDocsQuery(), 10, sort);
- assertEquals(3, td.totalHits.value);
+ assertEquals(3, td.totalHits.value());
// null comes first
assertNull(searcher.storedFields().document(td.scoreDocs[0].doc).get("value"));
assertEquals("foo", searcher.storedFields().document(td.scoreDocs[1].doc).get("value"));
@@ -352,7 +352,7 @@ public class TestFieldCacheSort extends SolrTestCase {
Sort sort = new Sort(SortField.FIELD_DOC);
TopDocs td = searcher.search(new MatchAllDocsQuery(), 10, sort);
- assertEquals(2, td.totalHits.value);
+ assertEquals(2, td.totalHits.value());
// docid 0, then docid 1
assertEquals(0, td.scoreDocs[0].doc);
assertEquals(1, td.scoreDocs[1].doc);
@@ -378,7 +378,7 @@ public class TestFieldCacheSort extends SolrTestCase {
Sort sort = new Sort(new SortField(null, SortField.Type.DOC, true));
TopDocs td = searcher.search(new MatchAllDocsQuery(), 10, sort);
- assertEquals(2, td.totalHits.value);
+ assertEquals(2, td.totalHits.value());
// docid 1, then docid 0
assertEquals(1, td.scoreDocs[0].doc);
assertEquals(0, td.scoreDocs[1].doc);
@@ -404,11 +404,11 @@ public class TestFieldCacheSort extends SolrTestCase {
Sort sort = new Sort();
TopDocs actual = searcher.search(new TermQuery(new Term("value", "foo")), 10, sort);
- assertEquals(2, actual.totalHits.value);
+ assertEquals(2, actual.totalHits.value());
TopDocs expected = searcher.search(new TermQuery(new Term("value", "foo")), 10);
// the two topdocs should be the same
- assertEquals(expected.totalHits.value, actual.totalHits.value);
+ assertEquals(expected.totalHits.value(), actual.totalHits.value());
for (int i = 0; i < actual.scoreDocs.length; i++) {
assertEquals(actual.scoreDocs[i].doc, expected.scoreDocs[i].doc);
}
@@ -436,11 +436,11 @@ public class TestFieldCacheSort extends SolrTestCase {
Sort sort = new Sort(new SortField(null, SortField.Type.SCORE, true));
TopDocs actual = searcher.search(new TermQuery(new Term("value", "foo")), 10, sort);
- assertEquals(2, actual.totalHits.value);
+ assertEquals(2, actual.totalHits.value());
TopDocs expected = searcher.search(new TermQuery(new Term("value", "foo")), 10);
// the two topdocs should be the reverse of each other
- assertEquals(expected.totalHits.value, actual.totalHits.value);
+ assertEquals(expected.totalHits.value(), actual.totalHits.value());
assertEquals(actual.scoreDocs[0].doc, expected.scoreDocs[1].doc);
assertEquals(actual.scoreDocs[1].doc, expected.scoreDocs[0].doc);
TestUtil.checkReader(ir);
@@ -473,7 +473,7 @@ public class TestFieldCacheSort extends SolrTestCase {
Sort sort = new Sort(new SortField("value", SortField.Type.INT));
TopDocs td = searcher.search(new MatchAllDocsQuery(), 10, sort);
- assertEquals(3, td.totalHits.value);
+ assertEquals(3, td.totalHits.value());
// numeric order
assertEquals("-1", searcher.storedFields().document(td.scoreDocs[0].doc).get("value"));
assertEquals("4", searcher.storedFields().document(td.scoreDocs[1].doc).get("value"));
@@ -506,7 +506,7 @@ public class TestFieldCacheSort extends SolrTestCase {
Sort sort = new Sort(new SortField("value", SortField.Type.INT));
TopDocs td = searcher.search(new MatchAllDocsQuery(), 10, sort);
- assertEquals(3, td.totalHits.value);
+ assertEquals(3, td.totalHits.value());
// null is treated as a 0
assertEquals("-1", searcher.storedFields().document(td.scoreDocs[0].doc).get("value"));
assertNull(searcher.storedFields().document(td.scoreDocs[1].doc).get("value"));
@@ -543,7 +543,7 @@ public class TestFieldCacheSort extends SolrTestCase {
Sort sort = new Sort(sortField);
TopDocs td = searcher.search(new MatchAllDocsQuery(), 10, sort);
- assertEquals(3, td.totalHits.value);
+ assertEquals(3, td.totalHits.value());
// null is treated as an Integer.MAX_VALUE
assertEquals("-1", searcher.storedFields().document(td.scoreDocs[0].doc).get("value"));
assertEquals("4", searcher.storedFields().document(td.scoreDocs[1].doc).get("value"));
@@ -578,7 +578,7 @@ public class TestFieldCacheSort extends SolrTestCase {
Sort sort = new Sort(new SortField("value", SortField.Type.INT, true));
TopDocs td = searcher.search(new MatchAllDocsQuery(), 10, sort);
- assertEquals(3, td.totalHits.value);
+ assertEquals(3, td.totalHits.value());
// reverse numeric order
assertEquals("300000", searcher.storedFields().document(td.scoreDocs[0].doc).get("value"));
assertEquals("4", searcher.storedFields().document(td.scoreDocs[1].doc).get("value"));
@@ -610,7 +610,7 @@ public class TestFieldCacheSort extends SolrTestCase {
Sort sort = new Sort(new SortField("value", SortField.Type.INT));
TopDocs td = searcher.search(new MatchAllDocsQuery(), 10, sort);
- assertEquals(3, td.totalHits.value);
+ assertEquals(3, td.totalHits.value());
// numeric order
assertEquals("-1", searcher.storedFields().document(td.scoreDocs[0].doc).get("value"));
assertEquals("4", searcher.storedFields().document(td.scoreDocs[1].doc).get("value"));
@@ -641,7 +641,7 @@ public class TestFieldCacheSort extends SolrTestCase {
Sort sort = new Sort(new SortField("value", SortField.Type.INT));
TopDocs td = searcher.search(new MatchAllDocsQuery(), 10, sort);
- assertEquals(3, td.totalHits.value);
+ assertEquals(3, td.totalHits.value());
// null is treated as a 0
assertEquals("-1", searcher.storedFields().document(td.scoreDocs[0].doc).get("value"));
assertNull(searcher.storedFields().document(td.scoreDocs[1].doc).get("value"));
@@ -677,7 +677,7 @@ public class TestFieldCacheSort extends SolrTestCase {
Sort sort = new Sort(sortField);
TopDocs td = searcher.search(new MatchAllDocsQuery(), 10, sort);
- assertEquals(3, td.totalHits.value);
+ assertEquals(3, td.totalHits.value());
// null is treated as an Integer.MAX_VALUE
assertEquals("-1", searcher.storedFields().document(td.scoreDocs[0].doc).get("value"));
assertEquals("4", searcher.storedFields().document(td.scoreDocs[1].doc).get("value"));
@@ -709,7 +709,7 @@ public class TestFieldCacheSort extends SolrTestCase {
Sort sort = new Sort(new SortField("value", SortField.Type.INT, true));
TopDocs td = searcher.search(new MatchAllDocsQuery(), 10, sort);
- assertEquals(3, td.totalHits.value);
+ assertEquals(3, td.totalHits.value());
// reverse numeric order
assertEquals("300000", searcher.storedFields().document(td.scoreDocs[0].doc).get("value"));
assertEquals("4", searcher.storedFields().document(td.scoreDocs[1].doc).get("value"));
@@ -744,7 +744,7 @@ public class TestFieldCacheSort extends SolrTestCase {
Sort sort = new Sort(new SortField("value", SortField.Type.LONG));
TopDocs td = searcher.search(new MatchAllDocsQuery(), 10, sort);
- assertEquals(3, td.totalHits.value);
+ assertEquals(3, td.totalHits.value());
// numeric order
assertEquals("-1", searcher.storedFields().document(td.scoreDocs[0].doc).get("value"));
assertEquals("4", searcher.storedFields().document(td.scoreDocs[1].doc).get("value"));
@@ -777,7 +777,7 @@ public class TestFieldCacheSort extends SolrTestCase {
Sort sort = new Sort(new SortField("value", SortField.Type.LONG));
TopDocs td = searcher.search(new MatchAllDocsQuery(), 10, sort);
- assertEquals(3, td.totalHits.value);
+ assertEquals(3, td.totalHits.value());
// null is treated as 0
assertEquals("-1", searcher.storedFields().document(td.scoreDocs[0].doc).get("value"));
assertNull(searcher.storedFields().document(td.scoreDocs[1].doc).get("value"));
@@ -814,7 +814,7 @@ public class TestFieldCacheSort extends SolrTestCase {
Sort sort = new Sort(sortField);
TopDocs td = searcher.search(new MatchAllDocsQuery(), 10, sort);
- assertEquals(3, td.totalHits.value);
+ assertEquals(3, td.totalHits.value());
// null is treated as Long.MAX_VALUE
assertEquals("-1", searcher.storedFields().document(td.scoreDocs[0].doc).get("value"));
assertEquals("4", searcher.storedFields().document(td.scoreDocs[1].doc).get("value"));
@@ -849,7 +849,7 @@ public class TestFieldCacheSort extends SolrTestCase {
Sort sort = new Sort(new SortField("value", SortField.Type.LONG, true));
TopDocs td = searcher.search(new MatchAllDocsQuery(), 10, sort);
- assertEquals(3, td.totalHits.value);
+ assertEquals(3, td.totalHits.value());
// reverse numeric order
assertEquals("3000000000", searcher.storedFields().document(td.scoreDocs[0].doc).get("value"));
assertEquals("4", searcher.storedFields().document(td.scoreDocs[1].doc).get("value"));
@@ -881,7 +881,7 @@ public class TestFieldCacheSort extends SolrTestCase {
Sort sort = new Sort(new SortField("value", SortField.Type.LONG));
TopDocs td = searcher.search(new MatchAllDocsQuery(), 10, sort);
- assertEquals(3, td.totalHits.value);
+ assertEquals(3, td.totalHits.value());
// numeric order
assertEquals("-1", searcher.storedFields().document(td.scoreDocs[0].doc).get("value"));
assertEquals("4", searcher.storedFields().document(td.scoreDocs[1].doc).get("value"));
@@ -912,7 +912,7 @@ public class TestFieldCacheSort extends SolrTestCase {
Sort sort = new Sort(new SortField("value", SortField.Type.LONG));
TopDocs td = searcher.search(new MatchAllDocsQuery(), 10, sort);
- assertEquals(3, td.totalHits.value);
+ assertEquals(3, td.totalHits.value());
// null is treated as 0
assertEquals("-1", searcher.storedFields().document(td.scoreDocs[0].doc).get("value"));
assertNull(searcher.storedFields().document(td.scoreDocs[1].doc).get("value"));
@@ -948,7 +948,7 @@ public class TestFieldCacheSort extends SolrTestCase {
Sort sort = new Sort(sortField);
TopDocs td = searcher.search(new MatchAllDocsQuery(), 10, sort);
- assertEquals(3, td.totalHits.value);
+ assertEquals(3, td.totalHits.value());
// null is treated as Long.MAX_VALUE
assertEquals("-1", searcher.storedFields().document(td.scoreDocs[0].doc).get("value"));
assertEquals("4", searcher.storedFields().document(td.scoreDocs[1].doc).get("value"));
@@ -980,7 +980,7 @@ public class TestFieldCacheSort extends SolrTestCase {
Sort sort = new Sort(new SortField("value", SortField.Type.LONG, true));
TopDocs td = searcher.search(new MatchAllDocsQuery(), 10, sort);
- assertEquals(3, td.totalHits.value);
+ assertEquals(3, td.totalHits.value());
// reverse numeric order
assertEquals("3000000000", searcher.storedFields().document(td.scoreDocs[0].doc).get("value"));
assertEquals("4", searcher.storedFields().document(td.scoreDocs[1].doc).get("value"));
@@ -1015,7 +1015,7 @@ public class TestFieldCacheSort extends SolrTestCase {
Sort sort = new Sort(new SortField("value", SortField.Type.FLOAT));
TopDocs td = searcher.search(new MatchAllDocsQuery(), 10, sort);
- assertEquals(3, td.totalHits.value);
+ assertEquals(3, td.totalHits.value());
// numeric order
assertEquals("-1.3", searcher.storedFields().document(td.scoreDocs[0].doc).get("value"));
assertEquals("4.2", searcher.storedFields().document(td.scoreDocs[1].doc).get("value"));
@@ -1048,7 +1048,7 @@ public class TestFieldCacheSort extends SolrTestCase {
Sort sort = new Sort(new SortField("value", SortField.Type.FLOAT));
TopDocs td = searcher.search(new MatchAllDocsQuery(), 10, sort);
- assertEquals(3, td.totalHits.value);
+ assertEquals(3, td.totalHits.value());
// null is treated as 0
assertEquals("-1.3", searcher.storedFields().document(td.scoreDocs[0].doc).get("value"));
assertNull(searcher.storedFields().document(td.scoreDocs[1].doc).get("value"));
@@ -1085,7 +1085,7 @@ public class TestFieldCacheSort extends SolrTestCase {
Sort sort = new Sort(sortField);
TopDocs td = searcher.search(new MatchAllDocsQuery(), 10, sort);
- assertEquals(3, td.totalHits.value);
+ assertEquals(3, td.totalHits.value());
// null is treated as Float.MAX_VALUE
assertEquals("-1.3", searcher.storedFields().document(td.scoreDocs[0].doc).get("value"));
assertEquals("4.2", searcher.storedFields().document(td.scoreDocs[1].doc).get("value"));
@@ -1120,7 +1120,7 @@ public class TestFieldCacheSort extends SolrTestCase {
Sort sort = new Sort(new SortField("value", SortField.Type.FLOAT, true));
TopDocs td = searcher.search(new MatchAllDocsQuery(), 10, sort);
- assertEquals(3, td.totalHits.value);
+ assertEquals(3, td.totalHits.value());
// reverse numeric order
assertEquals("30.1", searcher.storedFields().document(td.scoreDocs[0].doc).get("value"));
assertEquals("4.2", searcher.storedFields().document(td.scoreDocs[1].doc).get("value"));
@@ -1152,7 +1152,7 @@ public class TestFieldCacheSort extends SolrTestCase {
Sort sort = new Sort(new SortField("value", SortField.Type.FLOAT));
TopDocs td = searcher.search(new MatchAllDocsQuery(), 10, sort);
- assertEquals(3, td.totalHits.value);
+ assertEquals(3, td.totalHits.value());
// numeric order
assertEquals("-1.3", searcher.storedFields().document(td.scoreDocs[0].doc).get("value"));
assertEquals("4.2", searcher.storedFields().document(td.scoreDocs[1].doc).get("value"));
@@ -1183,7 +1183,7 @@ public class TestFieldCacheSort extends SolrTestCase {
Sort sort = new Sort(new SortField("value", SortField.Type.FLOAT));
TopDocs td = searcher.search(new MatchAllDocsQuery(), 10, sort);
- assertEquals(3, td.totalHits.value);
+ assertEquals(3, td.totalHits.value());
// null is treated as 0
assertEquals("-1.3", searcher.storedFields().document(td.scoreDocs[0].doc).get("value"));
assertNull(searcher.storedFields().document(td.scoreDocs[1].doc).get("value"));
@@ -1219,7 +1219,7 @@ public class TestFieldCacheSort extends SolrTestCase {
Sort sort = new Sort(sortField);
TopDocs td = searcher.search(new MatchAllDocsQuery(), 10, sort);
- assertEquals(3, td.totalHits.value);
+ assertEquals(3, td.totalHits.value());
// null is treated as Float.MAX_VALUE
assertEquals("-1.3", searcher.storedFields().document(td.scoreDocs[0].doc).get("value"));
assertEquals("4.2", searcher.storedFields().document(td.scoreDocs[1].doc).get("value"));
@@ -1251,7 +1251,7 @@ public class TestFieldCacheSort extends SolrTestCase {
Sort sort = new Sort(new SortField("value", SortField.Type.FLOAT, true));
TopDocs td = searcher.search(new MatchAllDocsQuery(), 10, sort);
- assertEquals(3, td.totalHits.value);
+ assertEquals(3, td.totalHits.value());
// reverse numeric order
assertEquals("30.1", searcher.storedFields().document(td.scoreDocs[0].doc).get("value"));
assertEquals("4.2", searcher.storedFields().document(td.scoreDocs[1].doc).get("value"));
@@ -1290,7 +1290,7 @@ public class TestFieldCacheSort extends SolrTestCase {
Sort sort = new Sort(new SortField("value", SortField.Type.DOUBLE));
TopDocs td = searcher.search(new MatchAllDocsQuery(), 10, sort);
- assertEquals(4, td.totalHits.value);
+ assertEquals(4, td.totalHits.value());
// numeric order
assertEquals("-1.3", searcher.storedFields().document(td.scoreDocs[0].doc).get("value"));
assertEquals(
@@ -1325,7 +1325,7 @@ public class TestFieldCacheSort extends SolrTestCase {
Sort sort = new Sort(new SortField("value", SortField.Type.DOUBLE));
TopDocs td = searcher.search(new MatchAllDocsQuery(), 10, sort);
- assertEquals(2, td.totalHits.value);
+ assertEquals(2, td.totalHits.value());
// numeric order
double v0 =
searcher
@@ -1378,7 +1378,7 @@ public class TestFieldCacheSort extends SolrTestCase {
Sort sort = new Sort(new SortField("value", SortField.Type.DOUBLE));
TopDocs td = searcher.search(new MatchAllDocsQuery(), 10, sort);
- assertEquals(4, td.totalHits.value);
+ assertEquals(4, td.totalHits.value());
// null treated as a 0
assertEquals("-1.3", searcher.storedFields().document(td.scoreDocs[0].doc).get("value"));
assertNull(searcher.storedFields().document(td.scoreDocs[1].doc).get("value"));
@@ -1423,7 +1423,7 @@ public class TestFieldCacheSort extends SolrTestCase {
Sort sort = new Sort(sortField);
TopDocs td = searcher.search(new MatchAllDocsQuery(), 10, sort);
- assertEquals(4, td.totalHits.value);
+ assertEquals(4, td.totalHits.value());
// null treated as Double.MAX_VALUE
assertEquals("-1.3", searcher.storedFields().document(td.scoreDocs[0].doc).get("value"));
assertEquals(
@@ -1465,7 +1465,7 @@ public class TestFieldCacheSort extends SolrTestCase {
Sort sort = new Sort(new SortField("value", SortField.Type.DOUBLE, true));
TopDocs td = searcher.search(new MatchAllDocsQuery(), 10, sort);
- assertEquals(4, td.totalHits.value);
+ assertEquals(4, td.totalHits.value());
// numeric order
assertEquals("30.1", searcher.storedFields().document(td.scoreDocs[0].doc).get("value"));
assertEquals(
@@ -1503,7 +1503,7 @@ public class TestFieldCacheSort extends SolrTestCase {
Sort sort = new Sort(new SortField("value", SortField.Type.DOUBLE));
TopDocs td = searcher.search(new MatchAllDocsQuery(), 10, sort);
- assertEquals(4, td.totalHits.value);
+ assertEquals(4, td.totalHits.value());
// numeric order
assertEquals("-1.3", searcher.storedFields().document(td.scoreDocs[0].doc).get("value"));
assertEquals(
@@ -1536,7 +1536,7 @@ public class TestFieldCacheSort extends SolrTestCase {
Sort sort = new Sort(new SortField("value", SortField.Type.DOUBLE));
TopDocs td = searcher.search(new MatchAllDocsQuery(), 10, sort);
- assertEquals(2, td.totalHits.value);
+ assertEquals(2, td.totalHits.value());
// numeric order
double v0 =
searcher
@@ -1586,7 +1586,7 @@ public class TestFieldCacheSort extends SolrTestCase {
Sort sort = new Sort(new SortField("value", SortField.Type.DOUBLE));
TopDocs td = searcher.search(new MatchAllDocsQuery(), 10, sort);
- assertEquals(4, td.totalHits.value);
+ assertEquals(4, td.totalHits.value());
// null treated as a 0
assertEquals("-1.3", searcher.storedFields().document(td.scoreDocs[0].doc).get("value"));
assertNull(searcher.storedFields().document(td.scoreDocs[1].doc).get("value"));
@@ -1628,7 +1628,7 @@ public class TestFieldCacheSort extends SolrTestCase {
Sort sort = new Sort(sortField);
TopDocs td = searcher.search(new MatchAllDocsQuery(), 10, sort);
- assertEquals(4, td.totalHits.value);
+ assertEquals(4, td.totalHits.value());
// null treated as Double.MAX_VALUE
assertEquals("-1.3", searcher.storedFields().document(td.scoreDocs[0].doc).get("value"));
assertEquals(
@@ -1666,7 +1666,7 @@ public class TestFieldCacheSort extends SolrTestCase {
Sort sort = new Sort(new SortField("value", SortField.Type.DOUBLE, true));
TopDocs td = searcher.search(new MatchAllDocsQuery(), 10, sort);
- assertEquals(4, td.totalHits.value);
+ assertEquals(4, td.totalHits.value());
// numeric order
assertEquals("30.1", searcher.storedFields().document(td.scoreDocs[0].doc).get("value"));
assertEquals(
@@ -1704,7 +1704,7 @@ public class TestFieldCacheSort extends SolrTestCase {
new TermQuery(new Term("t", "1")),
10,
new Sort(new SortField("f", SortField.Type.STRING)));
- assertEquals(2, hits.totalHits.value);
+ assertEquals(2, hits.totalHits.value());
// null sorts first
assertEquals(1, hits.scoreDocs[0].doc);
assertEquals(0, hits.scoreDocs[1].doc);
@@ -1781,31 +1781,31 @@ public class TestFieldCacheSort extends SolrTestCase {
Sort sort = new Sort();
TopDocs td = empty.search(query, 10, sort, true);
- assertEquals(0, td.totalHits.value);
+ assertEquals(0, td.totalHits.value());
sort = new Sort(SortField.FIELD_DOC);
td = empty.search(query, 10, sort, true);
- assertEquals(0, td.totalHits.value);
+ assertEquals(0, td.totalHits.value());
sort = new Sort(new SortField("int", SortField.Type.INT), SortField.FIELD_DOC);
td = empty.search(query, 10, sort, true);
- assertEquals(0, td.totalHits.value);
+ assertEquals(0, td.totalHits.value());
sort = new Sort(new SortField("string", SortField.Type.STRING, true), SortField.FIELD_DOC);
td = empty.search(query, 10, sort, true);
- assertEquals(0, td.totalHits.value);
+ assertEquals(0, td.totalHits.value());
sort =
new Sort(new SortField("string_val", SortField.Type.STRING_VAL, true), SortField.FIELD_DOC);
td = empty.search(query, 10, sort, true);
- assertEquals(0, td.totalHits.value);
+ assertEquals(0, td.totalHits.value());
sort =
new Sort(
new SortField("float", SortField.Type.FLOAT),
new SortField("string", SortField.Type.STRING));
td = empty.search(query, 10, sort, true);
- assertEquals(0, td.totalHits.value);
+ assertEquals(0, td.totalHits.value());
}
/** Tests sorting a single document */
@@ -1823,7 +1823,7 @@ public class TestFieldCacheSort extends SolrTestCase {
Sort sort = new Sort(new SortField("value", SortField.Type.STRING));
TopDocs td = searcher.search(new MatchAllDocsQuery(), 10, sort);
- assertEquals(1, td.totalHits.value);
+ assertEquals(1, td.totalHits.value());
assertEquals("foo", searcher.storedFields().document(td.scoreDocs[0].doc).get("value"));
TestUtil.checkReader(ir);
ir.close();
@@ -1845,10 +1845,10 @@ public class TestFieldCacheSort extends SolrTestCase {
Sort sort = new Sort(new SortField("value", SortField.Type.STRING));
TopDocs expected = searcher.search(new TermQuery(new Term("value", "foo")), 10);
- assertEquals(1, expected.totalHits.value);
+ assertEquals(1, expected.totalHits.value());
TopDocs actual = searcher.search(new TermQuery(new Term("value", "foo")), 10, sort, true);
- assertEquals(expected.totalHits.value, actual.totalHits.value);
+ assertEquals(expected.totalHits.value(), actual.totalHits.value());
assertEquals(expected.scoreDocs[0].score, actual.scoreDocs[0].score, 0F);
TestUtil.checkReader(ir);
ir.close();
@@ -1882,7 +1882,7 @@ public class TestFieldCacheSort extends SolrTestCase {
new SortField("value", SortField.Type.STRING));
TopDocs td = searcher.search(new MatchAllDocsQuery(), 10, sort);
- assertEquals(2, td.totalHits.value);
+ assertEquals(2, td.totalHits.value());
// 'bar' comes before 'foo'
assertEquals("bar", searcher.storedFields().document(td.scoreDocs[0].doc).get("value"));
assertEquals("foo", searcher.storedFields().document(td.scoreDocs[1].doc).get("value"));
@@ -1910,7 +1910,7 @@ public class TestFieldCacheSort extends SolrTestCase {
bq.add(new TermQuery(new Term("value", "foo")), Occur.SHOULD);
bq.add(new MatchAllDocsQuery(), Occur.SHOULD);
TopDocs td = searcher.search(bq.build(), 10, sort);
- assertEquals(2, td.totalHits.value);
+ assertEquals(2, td.totalHits.value());
if (Float.isNaN(td.scoreDocs[0].score) == false
&& Float.isNaN(td.scoreDocs[1].score) == false) {
assertEquals(1, td.scoreDocs[0].doc);
diff --git a/solr/core/src/test/org/apache/solr/uninverting/TestFieldCacheSortRandom.java b/solr/core/src/test/org/apache/solr/uninverting/TestFieldCacheSortRandom.java
index 410e3a4ee55..2bb6bb93828 100644
--- a/solr/core/src/test/org/apache/solr/uninverting/TestFieldCacheSortRandom.java
+++ b/solr/core/src/test/org/apache/solr/uninverting/TestFieldCacheSortRandom.java
@@ -46,6 +46,7 @@ import org.apache.lucene.search.Query;
import org.apache.lucene.search.QueryVisitor;
import org.apache.lucene.search.ScoreMode;
import org.apache.lucene.search.Scorer;
+import org.apache.lucene.search.ScorerSupplier;
import org.apache.lucene.search.Sort;
import org.apache.lucene.search.SortField;
import org.apache.lucene.search.TopFieldDocs;
@@ -86,6 +87,7 @@ public class TestFieldCacheSortRandom extends SolrTestCase {
int numDocs = 0;
final List<BytesRef> docValues = new ArrayList<>();
+ final Set<Integer> missingDocs = new HashSet<>(); // Track which docs have missing values
// TODO: deletions
while (numDocs < NUM_DOCS) {
final Document doc = new Document();
@@ -124,7 +126,9 @@ public class TestFieldCacheSortRandom extends SolrTestCase {
if (VERBOSE) {
System.out.println(" " + numDocs + ": <missing>");
}
- docValues.add(null);
+ // Track that this document has a missing value
+ missingDocs.add(numDocs);
+ docValues.add(null); // Use null to represent missing values in our expected list
}
doc.add(new IntPoint("id", numDocs));
@@ -147,7 +151,8 @@ public class TestFieldCacheSortRandom extends SolrTestCase {
System.out.println(" reader=" + r);
}
- final IndexSearcher s = newSearcher(r, false);
+ // Explicitly disable parallel search to ensure deterministic results
+ final IndexSearcher s = newSearcher(r, false, true, false);
final int ITERS = atLeast(100);
for (int iter = 0; iter < ITERS; iter++) {
final boolean reverse = random.nextBoolean();
@@ -171,7 +176,8 @@ public class TestFieldCacheSortRandom extends SolrTestCase {
sort = new Sort(sf, SortField.FIELD_DOC);
}
final int hitCount = TestUtil.nextInt(random, 1, r.maxDoc() + 20);
- final RandomQuery f = new RandomQuery(random.nextLong(), random.nextFloat(), docValues);
+ final RandomQuery f =
+ new RandomQuery(random.nextLong(), random.nextFloat(), docValues, missingDocs);
int queryType = random.nextInt(2);
if (queryType == 0) {
hits = s.search(new ConstantScoreQuery(f), hitCount, sort, false);
@@ -200,8 +206,13 @@ public class TestFieldCacheSortRandom extends SolrTestCase {
new Comparator<BytesRef>() {
@Override
public int compare(BytesRef a, BytesRef b) {
- if (a == null) {
- if (b == null) {
+ // In Lucene 10, only null represents missing values
+ // Empty BytesRef (length == 0) is a valid empty string value
+ boolean aIsMissing = (a == null);
+ boolean bIsMissing = (b == null);
+
+ if (aIsMissing) {
+ if (bIsMissing) {
return 0;
}
if (sortMissingLast) {
@@ -209,7 +220,7 @@ public class TestFieldCacheSortRandom extends SolrTestCase {
} else {
return -1;
}
- } else if (b == null) {
+ } else if (bIsMissing) {
if (sortMissingLast) {
return -1;
} else {
@@ -229,9 +240,7 @@ public class TestFieldCacheSortRandom extends SolrTestCase {
System.out.println(" expected:");
for (int idx = 0; idx < expected.size(); idx++) {
BytesRef br = expected.get(idx);
- if (br == null && missingIsNull == false) {
- br = new BytesRef();
- }
+ // In Lucene 10, missing values are already BytesRef(), no conversion needed
System.out.println(" " + idx + ": " + (br == null ? "<missing>" : br.utf8ToString()));
if (idx == hitCount - 1) {
break;
@@ -251,27 +260,22 @@ public class TestFieldCacheSortRandom extends SolrTestCase {
+ ": "
+ (br == null ? "<missing>" : br.utf8ToString())
+ " id="
- + s.doc(fd.doc).get("id"));
+ + s.storedFields().document(fd.doc).get("id"));
}
}
for (int hitIDX = 0; hitIDX < hits.scoreDocs.length; hitIDX++) {
final FieldDoc fd = (FieldDoc) hits.scoreDocs[hitIDX];
BytesRef br = expected.get(hitIDX);
- if (br == null && missingIsNull == false) {
- br = new BytesRef();
- }
-
- // Normally, the old codecs (that don't support
- // docsWithField via doc values) will always return
- // an empty BytesRef for the missing case; however,
- // if all docs in a given segment were missing, in
- // that case it will return null! So we must map
- // null here, too:
+ // In Lucene 10, sorting returns null for missing values
+ // Empty BytesRef is a valid value (empty string), not a missing value
BytesRef br2 = (BytesRef) fd.fields[0];
- if (br2 == null && missingIsNull == false) {
- br2 = new BytesRef();
- }
+ // Only null represents missing values, empty BytesRef is a valid empty string
+ if (br == null && br2 == null) {
+ // Both are missing values - they are equal
+ continue;
+ }
+ // Otherwise compare normally (including empty strings)
assertEquals(br, br2);
}
}
@@ -284,21 +288,24 @@ public class TestFieldCacheSortRandom extends SolrTestCase {
private final long seed;
private float density;
private final List<BytesRef> docValues;
+ private final Set<Integer> missingDocs;
public final List<BytesRef> matchValues =
Collections.synchronizedList(new ArrayList<BytesRef>());
// density should be 0.0 ... 1.0
- public RandomQuery(long seed, float density, List<BytesRef> docValues) {
+ public RandomQuery(
+ long seed, float density, List<BytesRef> docValues, Set<Integer> missingDocs) {
this.seed = seed;
this.density = density;
this.docValues = docValues;
+ this.missingDocs = missingDocs;
}
@Override
public Weight createWeight(IndexSearcher searcher, ScoreMode scoreMode, float boost) {
return new ConstantScoreWeight(this, boost) {
@Override
- public Scorer scorer(LeafReaderContext context) throws IOException {
+ public ScorerSupplier scorerSupplier(LeafReaderContext context) throws IOException {
Random random = new Random(seed ^ context.docBase);
final int maxDoc = context.reader().maxDoc();
final NumericDocValues idSource = DocValues.getNumeric(context.reader(), "id");
@@ -309,12 +316,37 @@ public class TestFieldCacheSortRandom extends SolrTestCase {
bits.set(docID);
// System.out.println(" acc id=" + idSource.getInt(docID) + " docID=" + docID);
assertEquals(docID, idSource.advance(docID));
- matchValues.add(docValues.get((int) idSource.longValue()));
+ // Use the ID value to look up the original doc value
+ int originalDocID = (int) idSource.longValue();
+ if (originalDocID < docValues.size()) {
+ if (missingDocs.contains(originalDocID)) {
+ matchValues.add(null);
+ } else {
+ BytesRef docValue = docValues.get(originalDocID);
+ // Note: docValue can be an actual empty string (length 0), which is NOT the same
+ // as missing
+ if (docValue == null) {
+ throw new IllegalStateException(
+ "Non-missing doc " + originalDocID + " has null docValue!");
+ }
+ matchValues.add(docValue);
+ }
+ }
}
}
- return new ConstantScoreScorer(
- this, score(), scoreMode, new BitSetIterator(bits, bits.approximateCardinality()));
+ return new ScorerSupplier() {
+ @Override
+ public Scorer get(long leadCost) throws IOException {
+ return new ConstantScoreScorer(
+ score(), scoreMode, new BitSetIterator(bits, bits.approximateCardinality()));
+ }
+
+ @Override
+ public long cost() {
+ return bits.approximateCardinality();
+ }
+ };
}
@Override
diff --git a/solr/core/src/test/org/apache/solr/uninverting/TestFieldCacheVsDocValues.java b/solr/core/src/test/org/apache/solr/uninverting/TestFieldCacheVsDocValues.java
index ec1525cef7d..78ccec9e6c6 100644
--- a/solr/core/src/test/org/apache/solr/uninverting/TestFieldCacheVsDocValues.java
+++ b/solr/core/src/test/org/apache/solr/uninverting/TestFieldCacheVsDocValues.java
@@ -16,7 +16,7 @@
*/
package org.apache.solr.uninverting;
-import static org.apache.lucene.index.SortedSetDocValues.NO_MORE_ORDS;
+// NO_MORE_ORDS removed in Lucene 10 - use docValueCount() instead
import static org.apache.lucene.search.DocIdSetIterator.NO_MORE_DOCS;
import java.util.ArrayList;
@@ -435,11 +435,15 @@ public class TestFieldCacheVsDocValues extends SolrTestCase {
if (docID == NO_MORE_DOCS) {
break;
}
- long expectedOrd;
- while ((expectedOrd = expected.nextOrd()) != NO_MORE_ORDS) {
- assertEquals(expectedOrd, actual.nextOrd());
+ long expectedCount = expected.docValueCount();
+ long actualCount = actual.docValueCount();
+ assertEquals(expectedCount, actualCount);
+
+ for (int i = 0; i < expectedCount; i++) {
+ long expectedOrd = expected.nextOrd();
+ long actualOrd = actual.nextOrd();
+ assertEquals(expectedOrd, actualOrd);
}
- assertEquals(NO_MORE_ORDS, actual.nextOrd());
}
// compare ord dictionary
diff --git a/solr/core/src/test/org/apache/solr/uninverting/TestNumericTerms32.java b/solr/core/src/test/org/apache/solr/uninverting/TestNumericTerms32.java
index 6596b75b6a4..5a7a55d8d87 100644
--- a/solr/core/src/test/org/apache/solr/uninverting/TestNumericTerms32.java
+++ b/solr/core/src/test/org/apache/solr/uninverting/TestNumericTerms32.java
@@ -138,7 +138,7 @@ public class TestNumericTerms32 extends SolrTestCase {
LegacyNumericRangeQuery.newIntRange(field, precisionStep, lower, upper, true, true);
TopDocs topDocs =
searcher.search(tq, noDocs, new Sort(new SortField(field, SortField.Type.INT, true)));
- if (topDocs.totalHits.value == 0) continue;
+ if (topDocs.totalHits.value() == 0) continue;
ScoreDoc[] sd = topDocs.scoreDocs;
assertNotNull(sd);
int last =
diff --git a/solr/core/src/test/org/apache/solr/uninverting/TestNumericTerms64.java b/solr/core/src/test/org/apache/solr/uninverting/TestNumericTerms64.java
index 48bdefe4b5c..1e40a429cbc 100644
--- a/solr/core/src/test/org/apache/solr/uninverting/TestNumericTerms64.java
+++ b/solr/core/src/test/org/apache/solr/uninverting/TestNumericTerms64.java
@@ -144,7 +144,7 @@ public class TestNumericTerms64 extends SolrTestCase {
LegacyNumericRangeQuery.newLongRange(field, precisionStep, lower, upper, true, true);
TopDocs topDocs =
searcher.search(tq, noDocs, new Sort(new SortField(field, SortField.Type.LONG, true)));
- if (topDocs.totalHits.value == 0) continue;
+ if (topDocs.totalHits.value() == 0) continue;
ScoreDoc[] sd = topDocs.scoreDocs;
assertNotNull(sd);
long last =
diff --git a/solr/core/src/test/org/apache/solr/uninverting/TestUninvertingReader.java b/solr/core/src/test/org/apache/solr/uninverting/TestUninvertingReader.java
index bd02e8018b2..77488bd08e4 100644
--- a/solr/core/src/test/org/apache/solr/uninverting/TestUninvertingReader.java
+++ b/solr/core/src/test/org/apache/solr/uninverting/TestUninvertingReader.java
@@ -86,12 +86,10 @@ public class TestUninvertingReader extends SolrTestCase {
assertEquals(0, v.nextDoc());
assertEquals(1, v.nextOrd());
- assertEquals(SortedSetDocValues.NO_MORE_ORDS, v.nextOrd());
assertEquals(1, v.nextDoc());
assertEquals(0, v.nextOrd());
assertEquals(1, v.nextOrd());
- assertEquals(SortedSetDocValues.NO_MORE_ORDS, v.nextOrd());
BytesRef value = v.lookupOrd(0);
assertEquals(-3, LegacyNumericUtils.prefixCodedToInt(value));
@@ -129,12 +127,10 @@ public class TestUninvertingReader extends SolrTestCase {
assertEquals(0, v.nextDoc());
assertEquals(1, v.nextOrd());
- assertEquals(SortedSetDocValues.NO_MORE_ORDS, v.nextOrd());
assertEquals(1, v.nextDoc());
assertEquals(0, v.nextOrd());
assertEquals(1, v.nextOrd());
- assertEquals(SortedSetDocValues.NO_MORE_ORDS, v.nextOrd());
BytesRef value = v.lookupOrd(0);
assertEquals(Float.floatToRawIntBits(-3f), LegacyNumericUtils.prefixCodedToInt(value));
@@ -171,12 +167,10 @@ public class TestUninvertingReader extends SolrTestCase {
assertEquals(0, v.nextDoc());
assertEquals(1, v.nextOrd());
- assertEquals(SortedSetDocValues.NO_MORE_ORDS, v.nextOrd());
assertEquals(1, v.nextDoc());
assertEquals(0, v.nextOrd());
assertEquals(1, v.nextOrd());
- assertEquals(SortedSetDocValues.NO_MORE_ORDS, v.nextOrd());
BytesRef value = v.lookupOrd(0);
assertEquals(-3, LegacyNumericUtils.prefixCodedToLong(value));
@@ -213,12 +207,10 @@ public class TestUninvertingReader extends SolrTestCase {
assertEquals(0, v.nextDoc());
assertEquals(1, v.nextOrd());
- assertEquals(SortedSetDocValues.NO_MORE_ORDS, v.nextOrd());
assertEquals(1, v.nextDoc());
assertEquals(0, v.nextOrd());
assertEquals(1, v.nextOrd());
- assertEquals(SortedSetDocValues.NO_MORE_ORDS, v.nextOrd());
BytesRef value = v.lookupOrd(0);
assertEquals(Double.doubleToRawLongBits(-3d), LegacyNumericUtils.prefixCodedToLong(value));
diff --git a/solr/core/src/test/org/apache/solr/update/AddBlockUpdateTest.java b/solr/core/src/test/org/apache/solr/update/AddBlockUpdateTest.java
index 7e630773725..2a2a0e0aa63 100644
--- a/solr/core/src/test/org/apache/solr/update/AddBlockUpdateTest.java
+++ b/solr/core/src/test/org/apache/solr/update/AddBlockUpdateTest.java
@@ -206,7 +206,7 @@ public class AddBlockUpdateTest extends SolrTestCaseJ4 {
assertSingleParentOf(searcher, one("ab"), dubbed);
final TopDocs docs = searcher.search(join(one("cd")), 10);
- assertEquals(2, docs.totalHits.value);
+ assertEquals(2, docs.totalHits.value());
final String pAct =
searcher.getDocFetcher().doc(docs.scoreDocs[0].doc).get(parent)
+ searcher.getDocFetcher().doc(docs.scoreDocs[1].doc).get(parent);
@@ -1028,7 +1028,7 @@ public class AddBlockUpdateTest extends SolrTestCaseJ4 {
final SolrIndexSearcher searcher, final String childTerm, String parentExp)
throws IOException {
final TopDocs docs = searcher.search(join(childTerm), 10);
- assertEquals(1, docs.totalHits.value);
+ assertEquals(1, docs.totalHits.value());
final String pAct = searcher.getDocFetcher().doc(docs.scoreDocs[0].doc).get(parent);
assertEquals(parentExp, pAct);
}
diff --git a/solr/core/src/test/org/apache/solr/update/SolrIndexConfigTest.java b/solr/core/src/test/org/apache/solr/update/SolrIndexConfigTest.java
index 54c58df9d90..66f623ed678 100644
--- a/solr/core/src/test/org/apache/solr/update/SolrIndexConfigTest.java
+++ b/solr/core/src/test/org/apache/solr/update/SolrIndexConfigTest.java
@@ -118,7 +118,7 @@ public class SolrIndexConfigTest extends SolrTestCaseJ4 {
ConcurrentMergeScheduler ms = (ConcurrentMergeScheduler) iwc.getMergeScheduler();
assertEquals("ms.maxMergeCount", 987, ms.getMaxMergeCount());
assertEquals("ms.maxThreadCount", 42, ms.getMaxThreadCount());
- assertTrue("ms.isAutoIOThrottle", ms.getAutoIOThrottle());
+ assertFalse("ms.isAutoIOThrottle", ms.getAutoIOThrottle());
}
@Test
diff --git a/solr/core/src/test/org/apache/solr/update/processor/TimeRoutedAliasUpdateProcessorTest.java b/solr/core/src/test/org/apache/solr/update/processor/TimeRoutedAliasUpdateProcessorTest.java
index 422feca1fa9..d59e8cb49bd 100644
--- a/solr/core/src/test/org/apache/solr/update/processor/TimeRoutedAliasUpdateProcessorTest.java
+++ b/solr/core/src/test/org/apache/solr/update/processor/TimeRoutedAliasUpdateProcessorTest.java
@@ -72,7 +72,7 @@ import org.junit.Test;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-@LuceneTestCase.BadApple(bugUrl = "https://issues.apache.org/jira/browse/SOLR-13059")
+@LuceneTestCase.AwaitsFix(bugUrl = "https://issues.apache.org/jira/browse/SOLR-13059")
public class TimeRoutedAliasUpdateProcessorTest extends RoutedAliasUpdateProcessorTest {
private static final Logger log = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
diff --git a/solr/core/src/test/org/apache/solr/util/SolrPluginUtilsTest.java b/solr/core/src/test/org/apache/solr/util/SolrPluginUtilsTest.java
index 4f3c3a01232..97b80a7cd45 100644
--- a/solr/core/src/test/org/apache/solr/util/SolrPluginUtilsTest.java
+++ b/solr/core/src/test/org/apache/solr/util/SolrPluginUtilsTest.java
@@ -201,13 +201,13 @@ public class SolrPluginUtilsTest extends SolrTestCaseJ4 {
BooleanQuery bq = (BooleanQuery) out;
List<BooleanClause> clauses = new ArrayList<>(bq.clauses());
assertEquals(t + " wrong number of clauses", 2, clauses.size());
- Query sub = clauses.get(0).getQuery();
+ Query sub = clauses.get(0).query();
assertTrue(t + " first wasn't a DMQ:" + sub.getClass(), sub instanceof DisjunctionMaxQuery);
assertEquals(
t + " first had wrong number of clauses",
4,
countItems(((DisjunctionMaxQuery) sub).iterator()));
- sub = clauses.get(1).getQuery();
+ sub = clauses.get(1).query();
assertTrue(t + " second wasn't a DMQ:" + sub.getClass(), sub instanceof DisjunctionMaxQuery);
assertEquals(
t + " second had wrong number of clauses",
@@ -224,13 +224,13 @@ public class SolrPluginUtilsTest extends SolrTestCaseJ4 {
BooleanQuery bq = (BooleanQuery) out;
List<BooleanClause> clauses = new ArrayList<>(bq.clauses());
assertEquals(t + " wrong number of clauses", 2, clauses.size());
- Query sub = clauses.get(0).getQuery();
+ Query sub = clauses.get(0).query();
assertTrue(t + " first wasn't a DMQ:" + sub.getClass(), sub instanceof DisjunctionMaxQuery);
assertEquals(
t + " first had wrong number of clauses",
4,
countItems(((DisjunctionMaxQuery) sub).iterator()));
- sub = clauses.get(1).getQuery();
+ sub = clauses.get(1).query();
assertTrue(t + " second wasn't a DMQ:" + sub.getClass(), sub instanceof DisjunctionMaxQuery);
assertEquals(
t + " second had wrong number of clauses (stop words)",
diff --git a/solr/cross-dc-manager/gradle.lockfile b/solr/cross-dc-manager/gradle.lockfile
index f50ed9196fb..d1f60e9edb2 100644
--- a/solr/cross-dc-manager/gradle.lockfile
+++ b/solr/cross-dc-manager/gradle.lockfile
@@ -27,7 +27,6 @@ com.google.errorprone:error_prone_annotations:2.31.0=annotationProcessor,compile
com.google.errorprone:error_prone_check_api:2.31.0=annotationProcessor,errorprone,testAnnotationProcessor
com.google.errorprone:error_prone_core:2.31.0=annotationProcessor,errorprone,testAnnotationProcessor
com.google.errorprone:error_prone_type_annotations:2.31.0=annotationProcessor,errorprone,testAnnotationProcessor
-com.google.errorprone:javac:9+181-r4173-1=errorproneJavac
com.google.guava:failureaccess:1.0.2=annotationProcessor,compileClasspath,errorprone,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testAnnotationProcessor,testCompileClasspath,testRuntimeClasspath
com.google.guava:guava:33.1.0-jre=annotationProcessor,compileClasspath,errorprone,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testAnnotationProcessor,testCompileClasspath,testRuntimeClasspath
com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava=annotationProcessor,compileClasspath,errorprone,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testAnnotationProcessor,testCompileClasspath,testRuntimeClasspath
@@ -44,7 +43,7 @@ com.typesafe.scala-logging:scala-logging_2.13:3.9.5=jarValidation,runtimeClasspa
com.yammer.metrics:metrics-core:2.2.0=jarValidation,runtimeClasspath,runtimeLibs,testRuntimeClasspath
commons-beanutils:commons-beanutils:1.9.4=jarValidation,runtimeClasspath,runtimeLibs,testRuntimeClasspath
commons-cli:commons-cli:1.9.0=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
-commons-codec:commons-codec:1.17.1=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
+commons-codec:commons-codec:1.17.2=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
commons-collections:commons-collections:3.2.2=jarValidation,runtimeClasspath,runtimeLibs,testRuntimeClasspath
commons-digester:commons-digester:2.1=jarValidation,runtimeClasspath,runtimeLibs,testRuntimeClasspath
commons-io:commons-io:2.17.0=compileClasspath,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testCompileClasspath,testRuntimeClasspath
@@ -89,7 +88,7 @@ net.bytebuddy:byte-buddy-agent:1.17.4=jarValidation,testRuntimeClasspath
net.bytebuddy:byte-buddy:1.17.4=jarValidation,testRuntimeClasspath
net.sf.jopt-simple:jopt-simple:5.0.4=jarValidation,runtimeClasspath,runtimeLibs,testRuntimeClasspath
net.sourceforge.argparse4j:argparse4j:0.7.0=jarValidation,runtimeClasspath,runtimeLibs,testRuntimeClasspath
-org.antlr:antlr4-runtime:4.11.1=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
+org.antlr:antlr4-runtime:4.13.2=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
org.apache.commons:commons-exec:1.4.0=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
org.apache.commons:commons-lang3:3.15.0=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
org.apache.commons:commons-math3:3.6.1=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
@@ -118,28 +117,28 @@ org.apache.logging.log4j:log4j-core:2.21.0=jarValidation,runtimeClasspath,runtim
org.apache.logging.log4j:log4j-layout-template-json:2.21.0=solrPlatformLibs
org.apache.logging.log4j:log4j-slf4j2-impl:2.21.0=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
org.apache.logging.log4j:log4j-web:2.21.0=solrPlatformLibs
-org.apache.lucene:lucene-analysis-common:9.12.2=compileClasspath,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testCompileClasspath,testRuntimeClasspath
-org.apache.lucene:lucene-analysis-kuromoji:9.12.2=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
-org.apache.lucene:lucene-analysis-nori:9.12.2=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
-org.apache.lucene:lucene-analysis-phonetic:9.12.2=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
-org.apache.lucene:lucene-backward-codecs:9.12.2=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
-org.apache.lucene:lucene-classification:9.12.2=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
-org.apache.lucene:lucene-codecs:9.12.2=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
-org.apache.lucene:lucene-core:9.12.2=compileClasspath,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testCompileClasspath,testRuntimeClasspath
-org.apache.lucene:lucene-expressions:9.12.2=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
-org.apache.lucene:lucene-facet:9.12.2=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
-org.apache.lucene:lucene-grouping:9.12.2=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
-org.apache.lucene:lucene-highlighter:9.12.2=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
-org.apache.lucene:lucene-join:9.12.2=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
-org.apache.lucene:lucene-memory:9.12.2=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
-org.apache.lucene:lucene-misc:9.12.2=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
-org.apache.lucene:lucene-queries:9.12.2=compileClasspath,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testCompileClasspath,testRuntimeClasspath
-org.apache.lucene:lucene-queryparser:9.12.2=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
-org.apache.lucene:lucene-sandbox:9.12.2=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
-org.apache.lucene:lucene-spatial-extras:9.12.2=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
-org.apache.lucene:lucene-spatial3d:9.12.2=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
-org.apache.lucene:lucene-suggest:9.12.2=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
-org.apache.lucene:lucene-test-framework:9.12.2=jarValidation,testCompileClasspath,testRuntimeClasspath
+org.apache.lucene:lucene-analysis-common:10.2.2=compileClasspath,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testCompileClasspath,testRuntimeClasspath
+org.apache.lucene:lucene-analysis-kuromoji:10.2.2=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
+org.apache.lucene:lucene-analysis-nori:10.2.2=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
+org.apache.lucene:lucene-analysis-phonetic:10.2.2=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
+org.apache.lucene:lucene-backward-codecs:10.2.2=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
+org.apache.lucene:lucene-classification:10.2.2=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
+org.apache.lucene:lucene-codecs:10.2.2=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
+org.apache.lucene:lucene-core:10.2.2=compileClasspath,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testCompileClasspath,testRuntimeClasspath
+org.apache.lucene:lucene-expressions:10.2.2=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
+org.apache.lucene:lucene-facet:10.2.2=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
+org.apache.lucene:lucene-grouping:10.2.2=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
+org.apache.lucene:lucene-highlighter:10.2.2=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
+org.apache.lucene:lucene-join:10.2.2=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
+org.apache.lucene:lucene-memory:10.2.2=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
+org.apache.lucene:lucene-misc:10.2.2=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
+org.apache.lucene:lucene-queries:10.2.2=compileClasspath,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testCompileClasspath,testRuntimeClasspath
+org.apache.lucene:lucene-queryparser:10.2.2=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
+org.apache.lucene:lucene-sandbox:10.2.2=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
+org.apache.lucene:lucene-spatial-extras:10.2.2=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
+org.apache.lucene:lucene-spatial3d:10.2.2=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
+org.apache.lucene:lucene-suggest:10.2.2=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
+org.apache.lucene:lucene-test-framework:10.2.2=jarValidation,testCompileClasspath,testRuntimeClasspath
org.apache.zookeeper:zookeeper-jute:3.9.3=compileClasspath,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testCompileClasspath,testRuntimeClasspath
org.apache.zookeeper:zookeeper:3.9.3=compileClasspath,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testCompileClasspath,testRuntimeClasspath
org.apiguardian:apiguardian-api:1.1.2=jarValidation,testRuntimeClasspath
diff --git a/solr/documentation/gradle.lockfile b/solr/documentation/gradle.lockfile
index 29100635f9f..3ccc864f7f5 100644
--- a/solr/documentation/gradle.lockfile
+++ b/solr/documentation/gradle.lockfile
@@ -1,11 +1,11 @@
# This is a Gradle generated file for dependency locking.
# Manual edits can break the build and are not advised.
# This file is expected to be part of source control.
-org.apache.lucene:lucene-analysis-common:9.12.2=javadocs
-org.apache.lucene:lucene-analysis-stempel:9.12.2=javadocs
-org.apache.lucene:lucene-core:9.12.2=javadocs
-org.apache.lucene:lucene-expressions:9.12.2=javadocs
-org.apache.lucene:lucene-queries:9.12.2=javadocs
-org.apache.lucene:lucene-queryparser:9.12.2=javadocs
-org.apache.lucene:lucene-spatial-extras:9.12.2=javadocs
+org.apache.lucene:lucene-analysis-common:10.2.2=javadocs
+org.apache.lucene:lucene-analysis-stempel:10.2.2=javadocs
+org.apache.lucene:lucene-core:10.2.2=javadocs
+org.apache.lucene:lucene-expressions:10.2.2=javadocs
+org.apache.lucene:lucene-queries:10.2.2=javadocs
+org.apache.lucene:lucene-queryparser:10.2.2=javadocs
+org.apache.lucene:lucene-spatial-extras:10.2.2=javadocs
empty=changesHtml,jarValidation,minimalSite,site
diff --git a/solr/licenses/antlr4-runtime-4.11.1.jar.sha1 b/solr/licenses/antlr4-runtime-4.11.1.jar.sha1
deleted file mode 100644
index 73976600b73..00000000000
--- a/solr/licenses/antlr4-runtime-4.11.1.jar.sha1
+++ /dev/null
@@ -1 +0,0 @@
-069214c1de1960040729702eb58deac8827135e7
diff --git a/solr/licenses/antlr4-runtime-4.13.2.jar.sha1 b/solr/licenses/antlr4-runtime-4.13.2.jar.sha1
new file mode 100644
index 00000000000..1c2007a4c9d
--- /dev/null
+++ b/solr/licenses/antlr4-runtime-4.13.2.jar.sha1
@@ -0,0 +1 @@
+fc3db6d844df652a3d5db31c87fa12757f13691d
diff --git a/solr/licenses/commons-codec-1.17.2.jar.sha1 b/solr/licenses/commons-codec-1.17.2.jar.sha1
new file mode 100644
index 00000000000..3ef561c0262
--- /dev/null
+++ b/solr/licenses/commons-codec-1.17.2.jar.sha1
@@ -0,0 +1 @@
+cd6bb9d856db5f61871a94d5801efd0b93b7fcb2
diff --git a/solr/licenses/icu4j-74.2.jar.sha1 b/solr/licenses/icu4j-74.2.jar.sha1
deleted file mode 100644
index 3a41b6fd371..00000000000
--- a/solr/licenses/icu4j-74.2.jar.sha1
+++ /dev/null
@@ -1 +0,0 @@
-97222d018f7f43cae88cacd1fad39717b001ffc4
diff --git a/solr/licenses/icu4j-77.1.jar.sha1 b/solr/licenses/icu4j-77.1.jar.sha1
new file mode 100644
index 00000000000..69e769a76dd
--- /dev/null
+++ b/solr/licenses/icu4j-77.1.jar.sha1
@@ -0,0 +1 @@
+38693cf0b1d7362a8b726af74dc06026a7c23809
diff --git a/solr/licenses/lucene-analysis-common-10.2.2.jar.sha1 b/solr/licenses/lucene-analysis-common-10.2.2.jar.sha1
new file mode 100644
index 00000000000..13eb9741bc3
--- /dev/null
+++ b/solr/licenses/lucene-analysis-common-10.2.2.jar.sha1
@@ -0,0 +1 @@
+2c35eb96330d96b6ffb61856ce2cd886a5656c81
diff --git a/solr/licenses/lucene-analysis-common-9.12.2.jar.sha1 b/solr/licenses/lucene-analysis-common-9.12.2.jar.sha1
deleted file mode 100644
index 9fa0e2eb2a3..00000000000
--- a/solr/licenses/lucene-analysis-common-9.12.2.jar.sha1
+++ /dev/null
@@ -1 +0,0 @@
-cdc24b721435268fb7e9344c05f70466674ba5b6
diff --git a/solr/licenses/lucene-analysis-icu-10.2.2.jar.sha1 b/solr/licenses/lucene-analysis-icu-10.2.2.jar.sha1
new file mode 100644
index 00000000000..40dcb336828
--- /dev/null
+++ b/solr/licenses/lucene-analysis-icu-10.2.2.jar.sha1
@@ -0,0 +1 @@
+2eef1532e030c6288e8324cf1dd7bb320624ef92
diff --git a/solr/licenses/lucene-analysis-icu-9.12.2.jar.sha1 b/solr/licenses/lucene-analysis-icu-9.12.2.jar.sha1
deleted file mode 100644
index f0bd4898ece..00000000000
--- a/solr/licenses/lucene-analysis-icu-9.12.2.jar.sha1
+++ /dev/null
@@ -1 +0,0 @@
-437ee60c5dd97d3f93891b70aae368769016ba66
diff --git a/solr/licenses/lucene-analysis-kuromoji-10.2.2.jar.sha1 b/solr/licenses/lucene-analysis-kuromoji-10.2.2.jar.sha1
new file mode 100644
index 00000000000..28a3d15838e
--- /dev/null
+++ b/solr/licenses/lucene-analysis-kuromoji-10.2.2.jar.sha1
@@ -0,0 +1 @@
+f5c20ba74a654553d9254ef5039228cca6f24a15
diff --git a/solr/licenses/lucene-analysis-kuromoji-9.12.2.jar.sha1 b/solr/licenses/lucene-analysis-kuromoji-9.12.2.jar.sha1
deleted file mode 100644
index 04acf79887e..00000000000
--- a/solr/licenses/lucene-analysis-kuromoji-9.12.2.jar.sha1
+++ /dev/null
@@ -1 +0,0 @@
-6cae333fd37b8e6ca9d236e8942ce6ee097fb629
diff --git a/solr/licenses/lucene-analysis-morfologik-10.2.2.jar.sha1 b/solr/licenses/lucene-analysis-morfologik-10.2.2.jar.sha1
new file mode 100644
index 00000000000..ccccd38641c
--- /dev/null
+++ b/solr/licenses/lucene-analysis-morfologik-10.2.2.jar.sha1
@@ -0,0 +1 @@
+58c74ea2ba52847071524fb0e9a2d54c116be5c0
diff --git a/solr/licenses/lucene-analysis-morfologik-9.12.2.jar.sha1 b/solr/licenses/lucene-analysis-morfologik-9.12.2.jar.sha1
deleted file mode 100644
index f7541a7ca73..00000000000
--- a/solr/licenses/lucene-analysis-morfologik-9.12.2.jar.sha1
+++ /dev/null
@@ -1 +0,0 @@
-d98158ea0c1044ee23d1a77e22106bd60f64e60e
diff --git a/solr/licenses/lucene-analysis-nori-10.2.2.jar.sha1 b/solr/licenses/lucene-analysis-nori-10.2.2.jar.sha1
new file mode 100644
index 00000000000..599d1bad6bd
--- /dev/null
+++ b/solr/licenses/lucene-analysis-nori-10.2.2.jar.sha1
@@ -0,0 +1 @@
+6480bbe3b6193aee805c45e577779c49b85bad82
diff --git a/solr/licenses/lucene-analysis-nori-9.12.2.jar.sha1 b/solr/licenses/lucene-analysis-nori-9.12.2.jar.sha1
deleted file mode 100644
index 0772cbdca80..00000000000
--- a/solr/licenses/lucene-analysis-nori-9.12.2.jar.sha1
+++ /dev/null
@@ -1 +0,0 @@
-0ed2c1cfe63fedbdc9567490a10ee9e7af5a2a14
diff --git a/solr/licenses/lucene-analysis-opennlp-10.2.2.jar.sha1 b/solr/licenses/lucene-analysis-opennlp-10.2.2.jar.sha1
new file mode 100644
index 00000000000..47c781a0cb3
--- /dev/null
+++ b/solr/licenses/lucene-analysis-opennlp-10.2.2.jar.sha1
@@ -0,0 +1 @@
+f8901464efdb6470ae67efe5b09f7a48de5f7c63
diff --git a/solr/licenses/lucene-analysis-opennlp-9.12.2.jar.sha1 b/solr/licenses/lucene-analysis-opennlp-9.12.2.jar.sha1
deleted file mode 100644
index 7c841b94310..00000000000
--- a/solr/licenses/lucene-analysis-opennlp-9.12.2.jar.sha1
+++ /dev/null
@@ -1 +0,0 @@
-10651134f6e7cbcfdc22757ec9b4ba2663aceb14
diff --git a/solr/licenses/lucene-analysis-phonetic-10.2.2.jar.sha1 b/solr/licenses/lucene-analysis-phonetic-10.2.2.jar.sha1
new file mode 100644
index 00000000000..51eb437cd00
--- /dev/null
+++ b/solr/licenses/lucene-analysis-phonetic-10.2.2.jar.sha1
@@ -0,0 +1 @@
+714c2fed8b8f522bebdb74ff2bfc6be9858d3fc9
diff --git a/solr/licenses/lucene-analysis-phonetic-9.12.2.jar.sha1 b/solr/licenses/lucene-analysis-phonetic-9.12.2.jar.sha1
deleted file mode 100644
index 9e9da79fae6..00000000000
--- a/solr/licenses/lucene-analysis-phonetic-9.12.2.jar.sha1
+++ /dev/null
@@ -1 +0,0 @@
-526d18443b70ccd97405e9d77fffc7132363b6af
diff --git a/solr/licenses/lucene-analysis-smartcn-10.2.2.jar.sha1 b/solr/licenses/lucene-analysis-smartcn-10.2.2.jar.sha1
new file mode 100644
index 00000000000..865adcc5847
--- /dev/null
+++ b/solr/licenses/lucene-analysis-smartcn-10.2.2.jar.sha1
@@ -0,0 +1 @@
+b080119e7b85dbceac57f8fc9d02d85175198a8d
diff --git a/solr/licenses/lucene-analysis-smartcn-9.12.2.jar.sha1 b/solr/licenses/lucene-analysis-smartcn-9.12.2.jar.sha1
deleted file mode 100644
index 41e6be18c25..00000000000
--- a/solr/licenses/lucene-analysis-smartcn-9.12.2.jar.sha1
+++ /dev/null
@@ -1 +0,0 @@
-d7c7b9b2e9d21e791dc4cd19fece2abdf4c94b2d
diff --git a/solr/licenses/lucene-analysis-stempel-10.2.2.jar.sha1 b/solr/licenses/lucene-analysis-stempel-10.2.2.jar.sha1
new file mode 100644
index 00000000000..480569eac45
--- /dev/null
+++ b/solr/licenses/lucene-analysis-stempel-10.2.2.jar.sha1
@@ -0,0 +1 @@
+23c64edfecbf7dd027a2f91112cd248b03644dc5
diff --git a/solr/licenses/lucene-analysis-stempel-9.12.2.jar.sha1 b/solr/licenses/lucene-analysis-stempel-9.12.2.jar.sha1
deleted file mode 100644
index fb1a44178c4..00000000000
--- a/solr/licenses/lucene-analysis-stempel-9.12.2.jar.sha1
+++ /dev/null
@@ -1 +0,0 @@
-8b1a8b0a1bce7e1758273b0c38842bda2e921cb6
diff --git a/solr/licenses/lucene-backward-codecs-10.2.2.jar.sha1 b/solr/licenses/lucene-backward-codecs-10.2.2.jar.sha1
new file mode 100644
index 00000000000..8406e5c2a54
--- /dev/null
+++ b/solr/licenses/lucene-backward-codecs-10.2.2.jar.sha1
@@ -0,0 +1 @@
+848ccaaadbcc97c84c09ad808fe4354af00449d9
diff --git a/solr/licenses/lucene-backward-codecs-9.12.2.jar.sha1 b/solr/licenses/lucene-backward-codecs-9.12.2.jar.sha1
deleted file mode 100644
index 7c4196010d2..00000000000
--- a/solr/licenses/lucene-backward-codecs-9.12.2.jar.sha1
+++ /dev/null
@@ -1 +0,0 @@
-cec3fb5be7f5667671fb9a0afee95c387e0d3b4c
diff --git a/solr/licenses/lucene-classification-10.2.2.jar.sha1 b/solr/licenses/lucene-classification-10.2.2.jar.sha1
new file mode 100644
index 00000000000..7c93705e00a
--- /dev/null
+++ b/solr/licenses/lucene-classification-10.2.2.jar.sha1
@@ -0,0 +1 @@
+93edc601e0c08bb0b966b0a730c2261906fe84e9
diff --git a/solr/licenses/lucene-classification-9.12.2.jar.sha1 b/solr/licenses/lucene-classification-9.12.2.jar.sha1
deleted file mode 100644
index aaa8a4ec749..00000000000
--- a/solr/licenses/lucene-classification-9.12.2.jar.sha1
+++ /dev/null
@@ -1 +0,0 @@
-8acc2b15037b8536b127e93249fced3005cc6e6d
diff --git a/solr/licenses/lucene-codecs-10.2.2.jar.sha1 b/solr/licenses/lucene-codecs-10.2.2.jar.sha1
new file mode 100644
index 00000000000..7e3db23a66a
--- /dev/null
+++ b/solr/licenses/lucene-codecs-10.2.2.jar.sha1
@@ -0,0 +1 @@
+92fcaca5ac2264bf35ae1c95f1961527dc1a21bb
diff --git a/solr/licenses/lucene-codecs-9.12.2.jar.sha1 b/solr/licenses/lucene-codecs-9.12.2.jar.sha1
deleted file mode 100644
index 6734d977486..00000000000
--- a/solr/licenses/lucene-codecs-9.12.2.jar.sha1
+++ /dev/null
@@ -1 +0,0 @@
-66bdbb80b4f55b284fae16259a1f620d8e63e71a
diff --git a/solr/licenses/lucene-core-10.2.2.jar.sha1 b/solr/licenses/lucene-core-10.2.2.jar.sha1
new file mode 100644
index 00000000000..5b478d9da4d
--- /dev/null
+++ b/solr/licenses/lucene-core-10.2.2.jar.sha1
@@ -0,0 +1 @@
+336a9c4b24e5704bd5fd71af794cce80f479a3ae
diff --git a/solr/licenses/lucene-core-9.12.2.jar.sha1 b/solr/licenses/lucene-core-9.12.2.jar.sha1
deleted file mode 100644
index 16a79d23aaf..00000000000
--- a/solr/licenses/lucene-core-9.12.2.jar.sha1
+++ /dev/null
@@ -1 +0,0 @@
-1369d425657294be298a7e128a562f5acd0a1dca
diff --git a/solr/licenses/lucene-expressions-10.2.2.jar.sha1 b/solr/licenses/lucene-expressions-10.2.2.jar.sha1
new file mode 100644
index 00000000000..b69e422389f
--- /dev/null
+++ b/solr/licenses/lucene-expressions-10.2.2.jar.sha1
@@ -0,0 +1 @@
+7123595c200562166426f710eab521c22b2f3dc8
diff --git a/solr/licenses/lucene-expressions-9.12.2.jar.sha1 b/solr/licenses/lucene-expressions-9.12.2.jar.sha1
deleted file mode 100644
index a6360495b93..00000000000
--- a/solr/licenses/lucene-expressions-9.12.2.jar.sha1
+++ /dev/null
@@ -1 +0,0 @@
-7c7cb348d6a84e59a5b61febfefa879d8841d9ad
diff --git a/solr/licenses/lucene-facet-10.2.2.jar.sha1 b/solr/licenses/lucene-facet-10.2.2.jar.sha1
new file mode 100644
index 00000000000..bda22ce9265
--- /dev/null
+++ b/solr/licenses/lucene-facet-10.2.2.jar.sha1
@@ -0,0 +1 @@
+a81ff8e4b40d2510b88aa55084d7d6cb280500a3
diff --git a/solr/licenses/lucene-facet-9.12.2.jar.sha1 b/solr/licenses/lucene-facet-9.12.2.jar.sha1
deleted file mode 100644
index f40c8edfc65..00000000000
--- a/solr/licenses/lucene-facet-9.12.2.jar.sha1
+++ /dev/null
@@ -1 +0,0 @@
-a1df84b323024765fa09c27c739d25cdab379d44
diff --git a/solr/licenses/lucene-grouping-10.2.2.jar.sha1 b/solr/licenses/lucene-grouping-10.2.2.jar.sha1
new file mode 100644
index 00000000000..cb50f50a050
--- /dev/null
+++ b/solr/licenses/lucene-grouping-10.2.2.jar.sha1
@@ -0,0 +1 @@
+da045cff5cfc86869be34338935e8d65456f7bd2
diff --git a/solr/licenses/lucene-grouping-9.12.2.jar.sha1 b/solr/licenses/lucene-grouping-9.12.2.jar.sha1
deleted file mode 100644
index d1d44de2595..00000000000
--- a/solr/licenses/lucene-grouping-9.12.2.jar.sha1
+++ /dev/null
@@ -1 +0,0 @@
-b3630e6494e1753192e738aa6ac8e330c30db064
diff --git a/solr/licenses/lucene-highlighter-10.2.2.jar.sha1 b/solr/licenses/lucene-highlighter-10.2.2.jar.sha1
new file mode 100644
index 00000000000..9df93774a90
--- /dev/null
+++ b/solr/licenses/lucene-highlighter-10.2.2.jar.sha1
@@ -0,0 +1 @@
+571fda0e8a9bf54896ab592143a09b39fdb036ee
diff --git a/solr/licenses/lucene-highlighter-9.12.2.jar.sha1 b/solr/licenses/lucene-highlighter-9.12.2.jar.sha1
deleted file mode 100644
index 9ae3076d13f..00000000000
--- a/solr/licenses/lucene-highlighter-9.12.2.jar.sha1
+++ /dev/null
@@ -1 +0,0 @@
-9a2312b6992ac5116003711f7f5db706e3342f88
diff --git a/solr/licenses/lucene-join-10.2.2.jar.sha1 b/solr/licenses/lucene-join-10.2.2.jar.sha1
new file mode 100644
index 00000000000..d204a3508f5
--- /dev/null
+++ b/solr/licenses/lucene-join-10.2.2.jar.sha1
@@ -0,0 +1 @@
+f1cd23b8d1773ec6b62f1972d47dae9102721f33
diff --git a/solr/licenses/lucene-join-9.12.2.jar.sha1 b/solr/licenses/lucene-join-9.12.2.jar.sha1
deleted file mode 100644
index fda6eeba0b3..00000000000
--- a/solr/licenses/lucene-join-9.12.2.jar.sha1
+++ /dev/null
@@ -1 +0,0 @@
-e69ad250b3905acf8bdfc1483806a53f47a6ed5a
diff --git a/solr/licenses/lucene-memory-10.2.2.jar.sha1 b/solr/licenses/lucene-memory-10.2.2.jar.sha1
new file mode 100644
index 00000000000..8e9a38264e4
--- /dev/null
+++ b/solr/licenses/lucene-memory-10.2.2.jar.sha1
@@ -0,0 +1 @@
+8709740d758b9358d0c9e3f4fcd34c9604740e20
diff --git a/solr/licenses/lucene-memory-9.12.2.jar.sha1 b/solr/licenses/lucene-memory-9.12.2.jar.sha1
deleted file mode 100644
index 02629765c8c..00000000000
--- a/solr/licenses/lucene-memory-9.12.2.jar.sha1
+++ /dev/null
@@ -1 +0,0 @@
-6a380a60c2388b37ebafae90ccdaee78d2106854
diff --git a/solr/licenses/lucene-misc-10.2.2.jar.sha1 b/solr/licenses/lucene-misc-10.2.2.jar.sha1
new file mode 100644
index 00000000000..772709d78e1
--- /dev/null
+++ b/solr/licenses/lucene-misc-10.2.2.jar.sha1
@@ -0,0 +1 @@
+047de3cefc3aa78ba11593d72c60f5b17a611c73
diff --git a/solr/licenses/lucene-misc-9.12.2.jar.sha1 b/solr/licenses/lucene-misc-9.12.2.jar.sha1
deleted file mode 100644
index b9668d9f1d2..00000000000
--- a/solr/licenses/lucene-misc-9.12.2.jar.sha1
+++ /dev/null
@@ -1 +0,0 @@
-c0bfbee60ad705ee43a30e59fcf37359bba58d4d
diff --git a/solr/licenses/lucene-queries-10.2.2.jar.sha1 b/solr/licenses/lucene-queries-10.2.2.jar.sha1
new file mode 100644
index 00000000000..03a57081b7f
--- /dev/null
+++ b/solr/licenses/lucene-queries-10.2.2.jar.sha1
@@ -0,0 +1 @@
+6dfc2197d9deacb699d7dc04f0afa919c926695e
diff --git a/solr/licenses/lucene-queries-9.12.2.jar.sha1 b/solr/licenses/lucene-queries-9.12.2.jar.sha1
deleted file mode 100644
index aa89e0becff..00000000000
--- a/solr/licenses/lucene-queries-9.12.2.jar.sha1
+++ /dev/null
@@ -1 +0,0 @@
-b745a713191e93da201afb50093a652def0d4f07
diff --git a/solr/licenses/lucene-queryparser-10.2.2.jar.sha1 b/solr/licenses/lucene-queryparser-10.2.2.jar.sha1
new file mode 100644
index 00000000000..663caabc1fd
--- /dev/null
+++ b/solr/licenses/lucene-queryparser-10.2.2.jar.sha1
@@ -0,0 +1 @@
+bb94dc5a00f01ccc7dc6804388bc7fe9f0070c75
diff --git a/solr/licenses/lucene-queryparser-9.12.2.jar.sha1 b/solr/licenses/lucene-queryparser-9.12.2.jar.sha1
deleted file mode 100644
index cf7c0ac5968..00000000000
--- a/solr/licenses/lucene-queryparser-9.12.2.jar.sha1
+++ /dev/null
@@ -1 +0,0 @@
-1fa802ec001c663a1b7fa0fea314c4a8c007b728
diff --git a/solr/licenses/lucene-sandbox-10.2.2.jar.sha1 b/solr/licenses/lucene-sandbox-10.2.2.jar.sha1
new file mode 100644
index 00000000000..4d44fab062a
--- /dev/null
+++ b/solr/licenses/lucene-sandbox-10.2.2.jar.sha1
@@ -0,0 +1 @@
+85c59725df3e564f69fe34e568373367b32781fe
diff --git a/solr/licenses/lucene-sandbox-9.12.2.jar.sha1 b/solr/licenses/lucene-sandbox-9.12.2.jar.sha1
deleted file mode 100644
index eb8c99d0f5a..00000000000
--- a/solr/licenses/lucene-sandbox-9.12.2.jar.sha1
+++ /dev/null
@@ -1 +0,0 @@
-a31ab6d32ae618abc4416a74d228306dfb2240a4
diff --git a/solr/licenses/lucene-spatial-extras-10.2.2.jar.sha1 b/solr/licenses/lucene-spatial-extras-10.2.2.jar.sha1
new file mode 100644
index 00000000000..b88a5237e32
--- /dev/null
+++ b/solr/licenses/lucene-spatial-extras-10.2.2.jar.sha1
@@ -0,0 +1 @@
+331552f95ef5f6a7f37fdeaf4d47f241a423af3c
diff --git a/solr/licenses/lucene-spatial-extras-9.12.2.jar.sha1 b/solr/licenses/lucene-spatial-extras-9.12.2.jar.sha1
deleted file mode 100644
index 678e3c23937..00000000000
--- a/solr/licenses/lucene-spatial-extras-9.12.2.jar.sha1
+++ /dev/null
@@ -1 +0,0 @@
-53f9fd386ea87d6d1444a705dbdc47a7b2ef2844
diff --git a/solr/licenses/lucene-spatial3d-10.2.2.jar.sha1 b/solr/licenses/lucene-spatial3d-10.2.2.jar.sha1
new file mode 100644
index 00000000000..12ebf1bf92d
--- /dev/null
+++ b/solr/licenses/lucene-spatial3d-10.2.2.jar.sha1
@@ -0,0 +1 @@
+27e435d8af25192970041a9a6b853347a17ef422
diff --git a/solr/licenses/lucene-spatial3d-9.12.2.jar.sha1 b/solr/licenses/lucene-spatial3d-9.12.2.jar.sha1
deleted file mode 100644
index 79ecda6a0ab..00000000000
--- a/solr/licenses/lucene-spatial3d-9.12.2.jar.sha1
+++ /dev/null
@@ -1 +0,0 @@
-239378a1940fef39965fe681f855b65d9b043de3
diff --git a/solr/licenses/lucene-suggest-10.2.2.jar.sha1 b/solr/licenses/lucene-suggest-10.2.2.jar.sha1
new file mode 100644
index 00000000000..8df13ed01b3
--- /dev/null
+++ b/solr/licenses/lucene-suggest-10.2.2.jar.sha1
@@ -0,0 +1 @@
+ddb40a1559e45d77c9417c8f6e6bb29c4c4dba8d
diff --git a/solr/licenses/lucene-suggest-9.12.2.jar.sha1 b/solr/licenses/lucene-suggest-9.12.2.jar.sha1
deleted file mode 100644
index e72479fba3e..00000000000
--- a/solr/licenses/lucene-suggest-9.12.2.jar.sha1
+++ /dev/null
@@ -1 +0,0 @@
-c798a106a47216b35a624ae2deb800efdf61cf56
diff --git a/solr/licenses/lucene-test-framework-10.2.2.jar.sha1 b/solr/licenses/lucene-test-framework-10.2.2.jar.sha1
new file mode 100644
index 00000000000..3d82346e1e6
--- /dev/null
+++ b/solr/licenses/lucene-test-framework-10.2.2.jar.sha1
@@ -0,0 +1 @@
+73deae9a12ce90f152dc1d10b602c8bc1b487fac
diff --git a/solr/licenses/lucene-test-framework-9.12.2.jar.sha1 b/solr/licenses/lucene-test-framework-9.12.2.jar.sha1
deleted file mode 100644
index a92c678b123..00000000000
--- a/solr/licenses/lucene-test-framework-9.12.2.jar.sha1
+++ /dev/null
@@ -1 +0,0 @@
-adf24a143c25758ac451ea88ff27f9b5d2c17600
diff --git a/solr/licenses/opennlp-tools-2.5.3.jar.sha1 b/solr/licenses/opennlp-tools-2.5.3.jar.sha1
new file mode 100644
index 00000000000..fb01299fa29
--- /dev/null
+++ b/solr/licenses/opennlp-tools-2.5.3.jar.sha1
@@ -0,0 +1 @@
+4b544138ec079c1c73dc2c1b928506871c4b1b47
diff --git a/solr/modules/analysis-extras/gradle.lockfile b/solr/modules/analysis-extras/gradle.lockfile
index f29d827e708..666f2e14e75 100644
--- a/solr/modules/analysis-extras/gradle.lockfile
+++ b/solr/modules/analysis-extras/gradle.lockfile
@@ -22,19 +22,18 @@ com.google.errorprone:error_prone_annotations:2.31.0=annotationProcessor,apiHelp
com.google.errorprone:error_prone_check_api:2.31.0=annotationProcessor,errorprone,testAnnotationProcessor
com.google.errorprone:error_prone_core:2.31.0=annotationProcessor,errorprone,testAnnotationProcessor
com.google.errorprone:error_prone_type_annotations:2.31.0=annotationProcessor,errorprone,testAnnotationProcessor
-com.google.errorprone:javac:9+181-r4173-1=errorproneJavac
com.google.guava:failureaccess:1.0.2=annotationProcessor,apiHelper,compileClasspath,errorprone,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testAnnotationProcessor,testCompileClasspath,testRuntimeClasspath
com.google.guava:guava:33.1.0-jre=annotationProcessor,apiHelper,compileClasspath,errorprone,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testAnnotationProcessor,testCompileClasspath,testRuntimeClasspath
com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava=annotationProcessor,apiHelper,compileClasspath,errorprone,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testAnnotationProcessor,testCompileClasspath,testRuntimeClasspath
com.google.j2objc:j2objc-annotations:3.0.0=compileClasspath,testCompileClasspath
com.google.protobuf:protobuf-java:3.25.3=annotationProcessor,errorprone,testAnnotationProcessor
-com.ibm.icu:icu4j:74.2=compileClasspath,jarValidation,runtimeClasspath,runtimeLibs,testCompileClasspath,testRuntimeClasspath
+com.ibm.icu:icu4j:77.1=compileClasspath,jarValidation,runtimeClasspath,runtimeLibs,testCompileClasspath,testRuntimeClasspath
com.j256.simplemagic:simplemagic:1.17=apiHelper,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
com.jayway.jsonpath:json-path:2.9.0=apiHelper,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
com.lmax:disruptor:3.4.4=solrPlatformLibs
com.tdunning:t-digest:3.3=apiHelper,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
commons-cli:commons-cli:1.9.0=apiHelper,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
-commons-codec:commons-codec:1.17.1=apiHelper,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
+commons-codec:commons-codec:1.17.2=apiHelper,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
commons-io:commons-io:2.17.0=apiHelper,compileClasspath,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testCompileClasspath,testRuntimeClasspath
io.dropwizard.metrics:metrics-annotation:4.2.26=jarValidation,solrPlatformLibs,testRuntimeClasspath
io.dropwizard.metrics:metrics-core:4.2.26=apiHelper,compileClasspath,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testCompileClasspath,testRuntimeClasspath
@@ -70,7 +69,7 @@ jakarta.ws.rs:jakarta.ws.rs-api:3.1.0=apiHelper,jarValidation,runtimeClasspath,r
javax.inject:javax.inject:1=annotationProcessor,errorprone,testAnnotationProcessor
junit:junit:4.13.2=jarValidation,testCompileClasspath,testRuntimeClasspath
net.bytebuddy:byte-buddy:1.17.4=jarValidation,testCompileClasspath,testRuntimeClasspath
-org.antlr:antlr4-runtime:4.11.1=apiHelper,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
+org.antlr:antlr4-runtime:4.13.2=apiHelper,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
org.apache.commons:commons-exec:1.4.0=apiHelper,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
org.apache.commons:commons-lang3:3.15.0=apiHelper,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
org.apache.commons:commons-math3:3.6.1=apiHelper,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
@@ -86,34 +85,34 @@ org.apache.logging.log4j:log4j-core:2.21.0=apiHelper,jarValidation,runtimeClassp
org.apache.logging.log4j:log4j-layout-template-json:2.21.0=solrPlatformLibs
org.apache.logging.log4j:log4j-slf4j2-impl:2.21.0=apiHelper,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
org.apache.logging.log4j:log4j-web:2.21.0=solrPlatformLibs
-org.apache.lucene:lucene-analysis-common:9.12.2=apiHelper,compileClasspath,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testCompileClasspath,testRuntimeClasspath
-org.apache.lucene:lucene-analysis-icu:9.12.2=compileClasspath,jarValidation,runtimeClasspath,runtimeLibs,testCompileClasspath,testRuntimeClasspath
-org.apache.lucene:lucene-analysis-kuromoji:9.12.2=apiHelper,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
-org.apache.lucene:lucene-analysis-morfologik:9.12.2=jarValidation,runtimeClasspath,runtimeLibs,testRuntimeClasspath
-org.apache.lucene:lucene-analysis-nori:9.12.2=apiHelper,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
-org.apache.lucene:lucene-analysis-opennlp:9.12.2=compileClasspath,jarValidation,runtimeClasspath,runtimeLibs,testCompileClasspath,testRuntimeClasspath
-org.apache.lucene:lucene-analysis-phonetic:9.12.2=apiHelper,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
-org.apache.lucene:lucene-analysis-smartcn:9.12.2=jarValidation,runtimeClasspath,runtimeLibs,testRuntimeClasspath
-org.apache.lucene:lucene-analysis-stempel:9.12.2=jarValidation,runtimeClasspath,runtimeLibs,testRuntimeClasspath
-org.apache.lucene:lucene-backward-codecs:9.12.2=apiHelper,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
-org.apache.lucene:lucene-classification:9.12.2=apiHelper,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
-org.apache.lucene:lucene-codecs:9.12.2=apiHelper,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
-org.apache.lucene:lucene-core:9.12.2=apiHelper,compileClasspath,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testCompileClasspath,testRuntimeClasspath
-org.apache.lucene:lucene-expressions:9.12.2=apiHelper,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
-org.apache.lucene:lucene-facet:9.12.2=apiHelper,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
-org.apache.lucene:lucene-grouping:9.12.2=apiHelper,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
-org.apache.lucene:lucene-highlighter:9.12.2=apiHelper,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
-org.apache.lucene:lucene-join:9.12.2=apiHelper,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
-org.apache.lucene:lucene-memory:9.12.2=apiHelper,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
-org.apache.lucene:lucene-misc:9.12.2=apiHelper,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
-org.apache.lucene:lucene-queries:9.12.2=apiHelper,compileClasspath,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testCompileClasspath,testRuntimeClasspath
-org.apache.lucene:lucene-queryparser:9.12.2=apiHelper,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
-org.apache.lucene:lucene-sandbox:9.12.2=apiHelper,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
-org.apache.lucene:lucene-spatial-extras:9.12.2=apiHelper,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
-org.apache.lucene:lucene-spatial3d:9.12.2=apiHelper,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
-org.apache.lucene:lucene-suggest:9.12.2=apiHelper,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
-org.apache.lucene:lucene-test-framework:9.12.2=jarValidation,testCompileClasspath,testRuntimeClasspath
-org.apache.opennlp:opennlp-tools:1.9.4=compileClasspath,jarValidation,runtimeClasspath,runtimeLibs,testCompileClasspath,testRuntimeClasspath
+org.apache.lucene:lucene-analysis-common:10.2.2=apiHelper,compileClasspath,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testCompileClasspath,testRuntimeClasspath
+org.apache.lucene:lucene-analysis-icu:10.2.2=compileClasspath,jarValidation,runtimeClasspath,runtimeLibs,testCompileClasspath,testRuntimeClasspath
+org.apache.lucene:lucene-analysis-kuromoji:10.2.2=apiHelper,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
+org.apache.lucene:lucene-analysis-morfologik:10.2.2=jarValidation,runtimeClasspath,runtimeLibs,testRuntimeClasspath
+org.apache.lucene:lucene-analysis-nori:10.2.2=apiHelper,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
+org.apache.lucene:lucene-analysis-opennlp:10.2.2=compileClasspath,jarValidation,runtimeClasspath,runtimeLibs,testCompileClasspath,testRuntimeClasspath
+org.apache.lucene:lucene-analysis-phonetic:10.2.2=apiHelper,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
+org.apache.lucene:lucene-analysis-smartcn:10.2.2=jarValidation,runtimeClasspath,runtimeLibs,testRuntimeClasspath
+org.apache.lucene:lucene-analysis-stempel:10.2.2=jarValidation,runtimeClasspath,runtimeLibs,testRuntimeClasspath
+org.apache.lucene:lucene-backward-codecs:10.2.2=apiHelper,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
+org.apache.lucene:lucene-classification:10.2.2=apiHelper,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
+org.apache.lucene:lucene-codecs:10.2.2=apiHelper,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
+org.apache.lucene:lucene-core:10.2.2=apiHelper,compileClasspath,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testCompileClasspath,testRuntimeClasspath
+org.apache.lucene:lucene-expressions:10.2.2=apiHelper,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
+org.apache.lucene:lucene-facet:10.2.2=apiHelper,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
+org.apache.lucene:lucene-grouping:10.2.2=apiHelper,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
+org.apache.lucene:lucene-highlighter:10.2.2=apiHelper,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
+org.apache.lucene:lucene-join:10.2.2=apiHelper,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
+org.apache.lucene:lucene-memory:10.2.2=apiHelper,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
+org.apache.lucene:lucene-misc:10.2.2=apiHelper,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
+org.apache.lucene:lucene-queries:10.2.2=apiHelper,compileClasspath,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testCompileClasspath,testRuntimeClasspath
+org.apache.lucene:lucene-queryparser:10.2.2=apiHelper,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
+org.apache.lucene:lucene-sandbox:10.2.2=apiHelper,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
+org.apache.lucene:lucene-spatial-extras:10.2.2=apiHelper,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
+org.apache.lucene:lucene-spatial3d:10.2.2=apiHelper,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
+org.apache.lucene:lucene-suggest:10.2.2=apiHelper,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
+org.apache.lucene:lucene-test-framework:10.2.2=jarValidation,testCompileClasspath,testRuntimeClasspath
+org.apache.opennlp:opennlp-tools:2.5.3=compileClasspath,jarValidation,runtimeClasspath,runtimeLibs,testCompileClasspath,testRuntimeClasspath
org.apache.zookeeper:zookeeper-jute:3.9.3=apiHelper,compileClasspath,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testCompileClasspath,testRuntimeClasspath
org.apache.zookeeper:zookeeper:3.9.3=apiHelper,compileClasspath,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testCompileClasspath,testRuntimeClasspath
org.apiguardian:apiguardian-api:1.1.2=jarValidation,testRuntimeClasspath
diff --git a/solr/modules/analysis-extras/src/test/org/apache/solr/schema/TestICUCollationFieldUDVAS.java b/solr/modules/analysis-extras/src/test/org/apache/solr/schema/TestICUCollationFieldUDVAS.java
index 9af65f9de65..be8fdbca5be 100644
--- a/solr/modules/analysis-extras/src/test/org/apache/solr/schema/TestICUCollationFieldUDVAS.java
+++ b/solr/modules/analysis-extras/src/test/org/apache/solr/schema/TestICUCollationFieldUDVAS.java
@@ -33,7 +33,8 @@ public class TestICUCollationFieldUDVAS extends SolrTestCaseJ4 {
private static final String ICU_FIELD_UDVAS_PROPNAME = "tests.icu_collation_field.udvas";
private static final String ICU_TYPE_UDVAS_PROPNAME = "tests.icu_collation_fieldType.udvas";
private static final String TEST_LUCENE_MATCH_VERSION_PROPNAME = "tests.luceneMatchVersion";
- private static final Version WARN_CEILING = Version.LUCENE_8_12_0;
+ // Test backward compatibility: someone upgrading to Solr 10 but keeping old luceneMatchVersion
+ private static final Version WARN_CEILING = Version.fromBits(8, 11, 0);
private static String home;
@BeforeClass
diff --git a/solr/modules/clustering/gradle.lockfile b/solr/modules/clustering/gradle.lockfile
index 6dbe98b46ce..7408c578cc4 100644
--- a/solr/modules/clustering/gradle.lockfile
+++ b/solr/modules/clustering/gradle.lockfile
@@ -22,7 +22,6 @@ com.google.errorprone:error_prone_annotations:2.31.0=annotationProcessor,compile
com.google.errorprone:error_prone_check_api:2.31.0=annotationProcessor,errorprone,testAnnotationProcessor
com.google.errorprone:error_prone_core:2.31.0=annotationProcessor,errorprone,testAnnotationProcessor
com.google.errorprone:error_prone_type_annotations:2.31.0=annotationProcessor,errorprone,testAnnotationProcessor
-com.google.errorprone:javac:9+181-r4173-1=errorproneJavac
com.google.guava:failureaccess:1.0.2=annotationProcessor,compileClasspath,errorprone,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testAnnotationProcessor,testCompileClasspath,testRuntimeClasspath
com.google.guava:guava:33.1.0-jre=annotationProcessor,compileClasspath,errorprone,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testAnnotationProcessor,testCompileClasspath,testRuntimeClasspath
com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava=annotationProcessor,compileClasspath,errorprone,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testAnnotationProcessor,testCompileClasspath,testRuntimeClasspath
@@ -33,7 +32,7 @@ com.jayway.jsonpath:json-path:2.9.0=jarValidation,runtimeClasspath,runtimeLibs,s
com.lmax:disruptor:3.4.4=solrPlatformLibs
com.tdunning:t-digest:3.3=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
commons-cli:commons-cli:1.9.0=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
-commons-codec:commons-codec:1.17.1=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
+commons-codec:commons-codec:1.17.2=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
commons-io:commons-io:2.17.0=compileClasspath,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testCompileClasspath,testRuntimeClasspath
io.dropwizard.metrics:metrics-annotation:4.2.26=jarValidation,solrPlatformLibs,testRuntimeClasspath
io.dropwizard.metrics:metrics-core:4.2.26=compileClasspath,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testCompileClasspath,testRuntimeClasspath
@@ -68,7 +67,7 @@ jakarta.validation:jakarta.validation-api:3.0.2=jarValidation,runtimeClasspath,r
jakarta.ws.rs:jakarta.ws.rs-api:3.1.0=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
javax.inject:javax.inject:1=annotationProcessor,errorprone,testAnnotationProcessor
junit:junit:4.13.2=jarValidation,testCompileClasspath,testRuntimeClasspath
-org.antlr:antlr4-runtime:4.11.1=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
+org.antlr:antlr4-runtime:4.13.2=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
org.apache.commons:commons-exec:1.4.0=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
org.apache.commons:commons-lang3:3.15.0=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
org.apache.commons:commons-math3:3.6.1=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
@@ -84,28 +83,28 @@ org.apache.logging.log4j:log4j-core:2.21.0=jarValidation,runtimeClasspath,runtim
org.apache.logging.log4j:log4j-layout-template-json:2.21.0=solrPlatformLibs
org.apache.logging.log4j:log4j-slf4j2-impl:2.21.0=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
org.apache.logging.log4j:log4j-web:2.21.0=solrPlatformLibs
-org.apache.lucene:lucene-analysis-common:9.12.2=compileClasspath,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testCompileClasspath,testRuntimeClasspath
-org.apache.lucene:lucene-analysis-kuromoji:9.12.2=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
-org.apache.lucene:lucene-analysis-nori:9.12.2=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
-org.apache.lucene:lucene-analysis-phonetic:9.12.2=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
-org.apache.lucene:lucene-backward-codecs:9.12.2=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
-org.apache.lucene:lucene-classification:9.12.2=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
-org.apache.lucene:lucene-codecs:9.12.2=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
-org.apache.lucene:lucene-core:9.12.2=compileClasspath,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testCompileClasspath,testRuntimeClasspath
-org.apache.lucene:lucene-expressions:9.12.2=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
-org.apache.lucene:lucene-facet:9.12.2=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
-org.apache.lucene:lucene-grouping:9.12.2=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
-org.apache.lucene:lucene-highlighter:9.12.2=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
-org.apache.lucene:lucene-join:9.12.2=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
-org.apache.lucene:lucene-memory:9.12.2=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
-org.apache.lucene:lucene-misc:9.12.2=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
-org.apache.lucene:lucene-queries:9.12.2=compileClasspath,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testCompileClasspath,testRuntimeClasspath
-org.apache.lucene:lucene-queryparser:9.12.2=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
-org.apache.lucene:lucene-sandbox:9.12.2=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
-org.apache.lucene:lucene-spatial-extras:9.12.2=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
-org.apache.lucene:lucene-spatial3d:9.12.2=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
-org.apache.lucene:lucene-suggest:9.12.2=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
-org.apache.lucene:lucene-test-framework:9.12.2=jarValidation,testCompileClasspath,testRuntimeClasspath
+org.apache.lucene:lucene-analysis-common:10.2.2=compileClasspath,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testCompileClasspath,testRuntimeClasspath
+org.apache.lucene:lucene-analysis-kuromoji:10.2.2=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
+org.apache.lucene:lucene-analysis-nori:10.2.2=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
+org.apache.lucene:lucene-analysis-phonetic:10.2.2=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
+org.apache.lucene:lucene-backward-codecs:10.2.2=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
+org.apache.lucene:lucene-classification:10.2.2=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
+org.apache.lucene:lucene-codecs:10.2.2=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
+org.apache.lucene:lucene-core:10.2.2=compileClasspath,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testCompileClasspath,testRuntimeClasspath
+org.apache.lucene:lucene-expressions:10.2.2=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
+org.apache.lucene:lucene-facet:10.2.2=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
+org.apache.lucene:lucene-grouping:10.2.2=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
+org.apache.lucene:lucene-highlighter:10.2.2=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
+org.apache.lucene:lucene-join:10.2.2=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
+org.apache.lucene:lucene-memory:10.2.2=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
+org.apache.lucene:lucene-misc:10.2.2=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
+org.apache.lucene:lucene-queries:10.2.2=compileClasspath,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testCompileClasspath,testRuntimeClasspath
+org.apache.lucene:lucene-queryparser:10.2.2=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
+org.apache.lucene:lucene-sandbox:10.2.2=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
+org.apache.lucene:lucene-spatial-extras:10.2.2=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
+org.apache.lucene:lucene-spatial3d:10.2.2=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
+org.apache.lucene:lucene-suggest:10.2.2=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
+org.apache.lucene:lucene-test-framework:10.2.2=jarValidation,testCompileClasspath,testRuntimeClasspath
org.apache.zookeeper:zookeeper-jute:3.9.3=compileClasspath,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testCompileClasspath,testRuntimeClasspath
org.apache.zookeeper:zookeeper:3.9.3=compileClasspath,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testCompileClasspath,testRuntimeClasspath
org.apiguardian:apiguardian-api:1.1.2=jarValidation,testRuntimeClasspath
diff --git a/solr/modules/cross-dc/gradle.lockfile b/solr/modules/cross-dc/gradle.lockfile
index 7c3c51c8f7b..3355c1c83c4 100644
--- a/solr/modules/cross-dc/gradle.lockfile
+++ b/solr/modules/cross-dc/gradle.lockfile
@@ -23,7 +23,6 @@ com.google.errorprone:error_prone_annotations:2.31.0=annotationProcessor,apiHelp
com.google.errorprone:error_prone_check_api:2.31.0=annotationProcessor,errorprone,testAnnotationProcessor
com.google.errorprone:error_prone_core:2.31.0=annotationProcessor,errorprone,testAnnotationProcessor
com.google.errorprone:error_prone_type_annotations:2.31.0=annotationProcessor,errorprone,testAnnotationProcessor
-com.google.errorprone:javac:9+181-r4173-1=errorproneJavac
com.google.guava:failureaccess:1.0.2=annotationProcessor,apiHelper,compileClasspath,errorprone,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testAnnotationProcessor,testCompileClasspath,testRuntimeClasspath
com.google.guava:guava:33.1.0-jre=annotationProcessor,apiHelper,compileClasspath,errorprone,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testAnnotationProcessor,testCompileClasspath,testRuntimeClasspath
com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava=annotationProcessor,apiHelper,compileClasspath,errorprone,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testAnnotationProcessor,testCompileClasspath,testRuntimeClasspath
@@ -34,7 +33,7 @@ com.jayway.jsonpath:json-path:2.9.0=apiHelper,jarValidation,runtimeClasspath,run
com.lmax:disruptor:3.4.4=solrPlatformLibs
com.tdunning:t-digest:3.3=apiHelper,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
commons-cli:commons-cli:1.9.0=apiHelper,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
-commons-codec:commons-codec:1.17.1=apiHelper,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
+commons-codec:commons-codec:1.17.2=apiHelper,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
commons-io:commons-io:2.17.0=apiHelper,compileClasspath,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testCompileClasspath,testRuntimeClasspath
io.dropwizard.metrics:metrics-annotation:4.2.26=jarValidation,solrPlatformLibs,testRuntimeClasspath
io.dropwizard.metrics:metrics-core:4.2.26=apiHelper,compileClasspath,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testCompileClasspath,testRuntimeClasspath
@@ -71,7 +70,7 @@ javax.inject:javax.inject:1=annotationProcessor,errorprone,testAnnotationProcess
junit:junit:4.13.2=jarValidation,testCompileClasspath,testRuntimeClasspath
net.bytebuddy:byte-buddy-agent:1.17.4=jarValidation,testRuntimeClasspath
net.bytebuddy:byte-buddy:1.17.4=jarValidation,testRuntimeClasspath
-org.antlr:antlr4-runtime:4.11.1=apiHelper,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
+org.antlr:antlr4-runtime:4.13.2=apiHelper,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
org.apache.commons:commons-exec:1.4.0=apiHelper,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
org.apache.commons:commons-lang3:3.15.0=apiHelper,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
org.apache.commons:commons-math3:3.6.1=apiHelper,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
@@ -88,28 +87,28 @@ org.apache.logging.log4j:log4j-core:2.21.0=apiHelper,jarValidation,runtimeClassp
org.apache.logging.log4j:log4j-layout-template-json:2.21.0=solrPlatformLibs
org.apache.logging.log4j:log4j-slf4j2-impl:2.21.0=apiHelper,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
org.apache.logging.log4j:log4j-web:2.21.0=solrPlatformLibs
-org.apache.lucene:lucene-analysis-common:9.12.2=apiHelper,compileClasspath,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testCompileClasspath,testRuntimeClasspath
-org.apache.lucene:lucene-analysis-kuromoji:9.12.2=apiHelper,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
-org.apache.lucene:lucene-analysis-nori:9.12.2=apiHelper,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
-org.apache.lucene:lucene-analysis-phonetic:9.12.2=apiHelper,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
-org.apache.lucene:lucene-backward-codecs:9.12.2=apiHelper,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
-org.apache.lucene:lucene-classification:9.12.2=apiHelper,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
-org.apache.lucene:lucene-codecs:9.12.2=apiHelper,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
-org.apache.lucene:lucene-core:9.12.2=apiHelper,compileClasspath,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testCompileClasspath,testRuntimeClasspath
-org.apache.lucene:lucene-expressions:9.12.2=apiHelper,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
-org.apache.lucene:lucene-facet:9.12.2=apiHelper,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
-org.apache.lucene:lucene-grouping:9.12.2=apiHelper,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
-org.apache.lucene:lucene-highlighter:9.12.2=apiHelper,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
-org.apache.lucene:lucene-join:9.12.2=apiHelper,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
-org.apache.lucene:lucene-memory:9.12.2=apiHelper,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
-org.apache.lucene:lucene-misc:9.12.2=apiHelper,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
-org.apache.lucene:lucene-queries:9.12.2=apiHelper,compileClasspath,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testCompileClasspath,testRuntimeClasspath
-org.apache.lucene:lucene-queryparser:9.12.2=apiHelper,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
-org.apache.lucene:lucene-sandbox:9.12.2=apiHelper,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
-org.apache.lucene:lucene-spatial-extras:9.12.2=apiHelper,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
-org.apache.lucene:lucene-spatial3d:9.12.2=apiHelper,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
-org.apache.lucene:lucene-suggest:9.12.2=apiHelper,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
-org.apache.lucene:lucene-test-framework:9.12.2=jarValidation,testCompileClasspath,testRuntimeClasspath
+org.apache.lucene:lucene-analysis-common:10.2.2=apiHelper,compileClasspath,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testCompileClasspath,testRuntimeClasspath
+org.apache.lucene:lucene-analysis-kuromoji:10.2.2=apiHelper,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
+org.apache.lucene:lucene-analysis-nori:10.2.2=apiHelper,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
+org.apache.lucene:lucene-analysis-phonetic:10.2.2=apiHelper,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
+org.apache.lucene:lucene-backward-codecs:10.2.2=apiHelper,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
+org.apache.lucene:lucene-classification:10.2.2=apiHelper,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
+org.apache.lucene:lucene-codecs:10.2.2=apiHelper,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
+org.apache.lucene:lucene-core:10.2.2=apiHelper,compileClasspath,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testCompileClasspath,testRuntimeClasspath
+org.apache.lucene:lucene-expressions:10.2.2=apiHelper,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
+org.apache.lucene:lucene-facet:10.2.2=apiHelper,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
+org.apache.lucene:lucene-grouping:10.2.2=apiHelper,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
+org.apache.lucene:lucene-highlighter:10.2.2=apiHelper,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
+org.apache.lucene:lucene-join:10.2.2=apiHelper,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
+org.apache.lucene:lucene-memory:10.2.2=apiHelper,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
+org.apache.lucene:lucene-misc:10.2.2=apiHelper,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
+org.apache.lucene:lucene-queries:10.2.2=apiHelper,compileClasspath,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testCompileClasspath,testRuntimeClasspath
+org.apache.lucene:lucene-queryparser:10.2.2=apiHelper,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
+org.apache.lucene:lucene-sandbox:10.2.2=apiHelper,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
+org.apache.lucene:lucene-spatial-extras:10.2.2=apiHelper,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
+org.apache.lucene:lucene-spatial3d:10.2.2=apiHelper,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
+org.apache.lucene:lucene-suggest:10.2.2=apiHelper,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
+org.apache.lucene:lucene-test-framework:10.2.2=jarValidation,testCompileClasspath,testRuntimeClasspath
org.apache.zookeeper:zookeeper-jute:3.9.3=apiHelper,compileClasspath,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testCompileClasspath,testRuntimeClasspath
org.apache.zookeeper:zookeeper:3.9.3=apiHelper,compileClasspath,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testCompileClasspath,testRuntimeClasspath
org.apiguardian:apiguardian-api:1.1.2=jarValidation,testRuntimeClasspath
diff --git a/solr/modules/extraction/gradle.lockfile b/solr/modules/extraction/gradle.lockfile
index 848c92aa17d..469399da7e1 100644
--- a/solr/modules/extraction/gradle.lockfile
+++ b/solr/modules/extraction/gradle.lockfile
@@ -30,7 +30,6 @@ com.google.errorprone:error_prone_annotations:2.31.0=annotationProcessor,compile
com.google.errorprone:error_prone_check_api:2.31.0=annotationProcessor,errorprone,testAnnotationProcessor
com.google.errorprone:error_prone_core:2.31.0=annotationProcessor,errorprone,testAnnotationProcessor
com.google.errorprone:error_prone_type_annotations:2.31.0=annotationProcessor,errorprone,testAnnotationProcessor
-com.google.errorprone:javac:9+181-r4173-1=errorproneJavac
com.google.guava:failureaccess:1.0.2=annotationProcessor,compileClasspath,errorprone,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testAnnotationProcessor,testCompileClasspath,testRuntimeClasspath
com.google.guava:guava:33.1.0-jre=annotationProcessor,compileClasspath,errorprone,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testAnnotationProcessor,testCompileClasspath,testRuntimeClasspath
com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava=annotationProcessor,compileClasspath,errorprone,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testAnnotationProcessor,testCompileClasspath,testRuntimeClasspath
@@ -54,7 +53,8 @@ com.sun.istack:istack-commons-runtime:3.0.12=compileClasspath,jarValidation,runt
com.tdunning:t-digest:3.3=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
com.zaxxer:SparseBitSet:1.2=compileClasspath,jarValidation,runtimeClasspath,runtimeLibs,testCompileClasspath,testRuntimeClasspath
commons-cli:commons-cli:1.9.0=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
-commons-codec:commons-codec:1.17.1=compileClasspath,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testCompileClasspath,testRuntimeClasspath
+commons-codec:commons-codec:1.17.1=compileClasspath,testCompileClasspath
+commons-codec:commons-codec:1.17.2=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
commons-io:commons-io:2.17.0=compileClasspath,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testCompileClasspath,testRuntimeClasspath
de.l3s.boilerpipe:boilerpipe:1.1.0=compileClasspath,jarValidation,runtimeClasspath,runtimeLibs,testCompileClasspath,testRuntimeClasspath
edu.ucar:cdm:4.5.5=compileClasspath,jarValidation,runtimeClasspath,runtimeLibs,testCompileClasspath,testRuntimeClasspath
@@ -102,7 +102,7 @@ joda-time:joda-time:2.13.0=compileClasspath,jarValidation,runtimeClasspath,runti
junit:junit:4.13.2=jarValidation,testCompileClasspath,testRuntimeClasspath
net.java.dev.jna:jna:5.12.1=compileClasspath,jarValidation,runtimeClasspath,runtimeLibs,testCompileClasspath,testRuntimeClasspath
net.sf.ehcache:ehcache-core:2.6.2=compileClasspath,jarValidation,runtimeClasspath,runtimeLibs,testCompileClasspath,testRuntimeClasspath
-org.antlr:antlr4-runtime:4.11.1=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
+org.antlr:antlr4-runtime:4.13.2=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
org.apache.commons:commons-collections4:4.4=compileClasspath,jarValidation,runtimeClasspath,runtimeLibs,testCompileClasspath,testRuntimeClasspath
org.apache.commons:commons-compress:1.26.1=compileClasspath,jarValidation,runtimeClasspath,runtimeLibs,testCompileClasspath,testRuntimeClasspath
org.apache.commons:commons-csv:1.9.0=compileClasspath,jarValidation,runtimeClasspath,runtimeLibs,testCompileClasspath,testRuntimeClasspath
@@ -123,29 +123,29 @@ org.apache.logging.log4j:log4j-core:2.21.0=jarValidation,runtimeClasspath,runtim
org.apache.logging.log4j:log4j-layout-template-json:2.21.0=solrPlatformLibs
org.apache.logging.log4j:log4j-slf4j2-impl:2.21.0=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
org.apache.logging.log4j:log4j-web:2.21.0=solrPlatformLibs
-org.apache.lucene:lucene-analysis-common:9.12.2=compileClasspath,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testCompileClasspath,testRuntimeClasspath
-org.apache.lucene:lucene-analysis-kuromoji:9.12.2=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
-org.apache.lucene:lucene-analysis-nori:9.12.2=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
-org.apache.lucene:lucene-analysis-phonetic:9.12.2=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
-org.apache.lucene:lucene-backward-codecs:9.12.2=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
-org.apache.lucene:lucene-classification:9.12.2=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
-org.apache.lucene:lucene-codecs:9.12.2=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
-org.apache.lucene:lucene-core:9.12.2=compileClasspath,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testCompileClasspath,testRuntimeClasspath
-org.apache.lucene:lucene-expressions:9.12.2=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
-org.apache.lucene:lucene-facet:9.12.2=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
-org.apache.lucene:lucene-grouping:9.12.2=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
-org.apache.lucene:lucene-highlighter:9.12.2=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
-org.apache.lucene:lucene-join:9.12.2=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
-org.apache.lucene:lucene-memory:9.12.2=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
-org.apache.lucene:lucene-misc:9.12.2=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
-org.apache.lucene:lucene-queries:9.12.2=compileClasspath,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testCompileClasspath,testRuntimeClasspath
-org.apache.lucene:lucene-queryparser:9.12.2=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
-org.apache.lucene:lucene-sandbox:9.12.2=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
-org.apache.lucene:lucene-spatial-extras:9.12.2=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
-org.apache.lucene:lucene-spatial3d:9.12.2=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
-org.apache.lucene:lucene-suggest:9.12.2=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
-org.apache.lucene:lucene-test-framework:9.12.2=jarValidation,testCompileClasspath,testRuntimeClasspath
-org.apache.opennlp:opennlp-tools:1.9.4=compileClasspath,jarValidation,runtimeClasspath,runtimeLibs,testCompileClasspath,testRuntimeClasspath
+org.apache.lucene:lucene-analysis-common:10.2.2=compileClasspath,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testCompileClasspath,testRuntimeClasspath
+org.apache.lucene:lucene-analysis-kuromoji:10.2.2=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
+org.apache.lucene:lucene-analysis-nori:10.2.2=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
+org.apache.lucene:lucene-analysis-phonetic:10.2.2=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
+org.apache.lucene:lucene-backward-codecs:10.2.2=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
+org.apache.lucene:lucene-classification:10.2.2=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
+org.apache.lucene:lucene-codecs:10.2.2=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
+org.apache.lucene:lucene-core:10.2.2=compileClasspath,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testCompileClasspath,testRuntimeClasspath
+org.apache.lucene:lucene-expressions:10.2.2=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
+org.apache.lucene:lucene-facet:10.2.2=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
+org.apache.lucene:lucene-grouping:10.2.2=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
+org.apache.lucene:lucene-highlighter:10.2.2=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
+org.apache.lucene:lucene-join:10.2.2=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
+org.apache.lucene:lucene-memory:10.2.2=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
+org.apache.lucene:lucene-misc:10.2.2=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
+org.apache.lucene:lucene-queries:10.2.2=compileClasspath,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testCompileClasspath,testRuntimeClasspath
+org.apache.lucene:lucene-queryparser:10.2.2=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
+org.apache.lucene:lucene-sandbox:10.2.2=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
+org.apache.lucene:lucene-spatial-extras:10.2.2=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
+org.apache.lucene:lucene-spatial3d:10.2.2=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
+org.apache.lucene:lucene-suggest:10.2.2=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
+org.apache.lucene:lucene-test-framework:10.2.2=jarValidation,testCompileClasspath,testRuntimeClasspath
+org.apache.opennlp:opennlp-tools:2.5.3=compileClasspath,jarValidation,runtimeClasspath,runtimeLibs,testCompileClasspath,testRuntimeClasspath
org.apache.pdfbox:fontbox:2.0.26=compileClasspath,jarValidation,runtimeClasspath,runtimeLibs,testCompileClasspath,testRuntimeClasspath
org.apache.pdfbox:jbig2-imageio:3.0.4=compileClasspath,jarValidation,runtimeClasspath,runtimeLibs,testCompileClasspath,testRuntimeClasspath
org.apache.pdfbox:jempbox:1.8.16=compileClasspath,jarValidation,runtimeClasspath,runtimeLibs,testCompileClasspath,testRuntimeClasspath
diff --git a/solr/modules/gcs-repository/gradle.lockfile b/solr/modules/gcs-repository/gradle.lockfile
index 88b3138f092..be58b24921b 100644
--- a/solr/modules/gcs-repository/gradle.lockfile
+++ b/solr/modules/gcs-repository/gradle.lockfile
@@ -43,7 +43,6 @@ com.google.errorprone:error_prone_annotations:2.31.0=annotationProcessor,apiHelp
com.google.errorprone:error_prone_check_api:2.31.0=annotationProcessor,errorprone,testAnnotationProcessor
com.google.errorprone:error_prone_core:2.31.0=annotationProcessor,errorprone,testAnnotationProcessor
com.google.errorprone:error_prone_type_annotations:2.31.0=annotationProcessor,errorprone,testAnnotationProcessor
-com.google.errorprone:javac:9+181-r4173-1=errorproneJavac
com.google.guava:failureaccess:1.0.2=annotationProcessor,apiHelper,compileClasspath,errorprone,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testAnnotationProcessor,testCompileClasspath,testRuntimeClasspath
com.google.guava:guava:33.1.0-jre=annotationProcessor,apiHelper,compileClasspath,errorprone,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testAnnotationProcessor,testCompileClasspath,testRuntimeClasspath
com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava=annotationProcessor,apiHelper,compileClasspath,errorprone,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testAnnotationProcessor,testCompileClasspath,testRuntimeClasspath
@@ -62,7 +61,8 @@ com.jayway.jsonpath:json-path:2.9.0=apiHelper,jarValidation,runtimeClasspath,run
com.lmax:disruptor:3.4.4=solrPlatformLibs
com.tdunning:t-digest:3.3=apiHelper,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
commons-cli:commons-cli:1.9.0=apiHelper,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
-commons-codec:commons-codec:1.17.1=apiHelper,compileClasspath,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testCompileClasspath,testRuntimeClasspath
+commons-codec:commons-codec:1.17.1=compileClasspath,testCompileClasspath
+commons-codec:commons-codec:1.17.2=apiHelper,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
commons-io:commons-io:2.17.0=apiHelper,compileClasspath,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testCompileClasspath,testRuntimeClasspath
io.dropwizard.metrics:metrics-annotation:4.2.26=jarValidation,solrPlatformLibs,testRuntimeClasspath
io.dropwizard.metrics:metrics-core:4.2.26=apiHelper,compileClasspath,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testCompileClasspath,testRuntimeClasspath
@@ -118,7 +118,7 @@ jakarta.validation:jakarta.validation-api:3.0.2=apiHelper,jarValidation,runtimeC
jakarta.ws.rs:jakarta.ws.rs-api:3.1.0=apiHelper,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
javax.inject:javax.inject:1=annotationProcessor,errorprone,jarValidation,testAnnotationProcessor,testCompileClasspath,testRuntimeClasspath
junit:junit:4.13.2=jarValidation,testCompileClasspath,testRuntimeClasspath
-org.antlr:antlr4-runtime:4.11.1=apiHelper,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
+org.antlr:antlr4-runtime:4.13.2=apiHelper,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
org.apache.commons:commons-exec:1.4.0=apiHelper,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
org.apache.commons:commons-lang3:3.15.0=apiHelper,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
org.apache.commons:commons-math3:3.6.1=apiHelper,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
@@ -134,28 +134,28 @@ org.apache.logging.log4j:log4j-core:2.21.0=apiHelper,jarValidation,runtimeClassp
org.apache.logging.log4j:log4j-layout-template-json:2.21.0=solrPlatformLibs
org.apache.logging.log4j:log4j-slf4j2-impl:2.21.0=apiHelper,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
org.apache.logging.log4j:log4j-web:2.21.0=solrPlatformLibs
-org.apache.lucene:lucene-analysis-common:9.12.2=apiHelper,compileClasspath,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testCompileClasspath,testRuntimeClasspath
-org.apache.lucene:lucene-analysis-kuromoji:9.12.2=apiHelper,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
-org.apache.lucene:lucene-analysis-nori:9.12.2=apiHelper,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
-org.apache.lucene:lucene-analysis-phonetic:9.12.2=apiHelper,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
-org.apache.lucene:lucene-backward-codecs:9.12.2=apiHelper,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
-org.apache.lucene:lucene-classification:9.12.2=apiHelper,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
-org.apache.lucene:lucene-codecs:9.12.2=apiHelper,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
-org.apache.lucene:lucene-core:9.12.2=apiHelper,compileClasspath,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testCompileClasspath,testRuntimeClasspath
-org.apache.lucene:lucene-expressions:9.12.2=apiHelper,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
-org.apache.lucene:lucene-facet:9.12.2=apiHelper,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
-org.apache.lucene:lucene-grouping:9.12.2=apiHelper,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
-org.apache.lucene:lucene-highlighter:9.12.2=apiHelper,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
-org.apache.lucene:lucene-join:9.12.2=apiHelper,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
-org.apache.lucene:lucene-memory:9.12.2=apiHelper,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
-org.apache.lucene:lucene-misc:9.12.2=apiHelper,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
-org.apache.lucene:lucene-queries:9.12.2=apiHelper,compileClasspath,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testCompileClasspath,testRuntimeClasspath
-org.apache.lucene:lucene-queryparser:9.12.2=apiHelper,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
-org.apache.lucene:lucene-sandbox:9.12.2=apiHelper,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
-org.apache.lucene:lucene-spatial-extras:9.12.2=apiHelper,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
-org.apache.lucene:lucene-spatial3d:9.12.2=apiHelper,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
-org.apache.lucene:lucene-suggest:9.12.2=apiHelper,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
-org.apache.lucene:lucene-test-framework:9.12.2=jarValidation,testCompileClasspath,testRuntimeClasspath
+org.apache.lucene:lucene-analysis-common:10.2.2=apiHelper,compileClasspath,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testCompileClasspath,testRuntimeClasspath
+org.apache.lucene:lucene-analysis-kuromoji:10.2.2=apiHelper,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
+org.apache.lucene:lucene-analysis-nori:10.2.2=apiHelper,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
+org.apache.lucene:lucene-analysis-phonetic:10.2.2=apiHelper,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
+org.apache.lucene:lucene-backward-codecs:10.2.2=apiHelper,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
+org.apache.lucene:lucene-classification:10.2.2=apiHelper,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
+org.apache.lucene:lucene-codecs:10.2.2=apiHelper,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
+org.apache.lucene:lucene-core:10.2.2=apiHelper,compileClasspath,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testCompileClasspath,testRuntimeClasspath
+org.apache.lucene:lucene-expressions:10.2.2=apiHelper,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
+org.apache.lucene:lucene-facet:10.2.2=apiHelper,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
+org.apache.lucene:lucene-grouping:10.2.2=apiHelper,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
+org.apache.lucene:lucene-highlighter:10.2.2=apiHelper,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
+org.apache.lucene:lucene-join:10.2.2=apiHelper,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
+org.apache.lucene:lucene-memory:10.2.2=apiHelper,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
+org.apache.lucene:lucene-misc:10.2.2=apiHelper,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
+org.apache.lucene:lucene-queries:10.2.2=apiHelper,compileClasspath,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testCompileClasspath,testRuntimeClasspath
+org.apache.lucene:lucene-queryparser:10.2.2=apiHelper,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
+org.apache.lucene:lucene-sandbox:10.2.2=apiHelper,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
+org.apache.lucene:lucene-spatial-extras:10.2.2=apiHelper,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
+org.apache.lucene:lucene-spatial3d:10.2.2=apiHelper,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
+org.apache.lucene:lucene-suggest:10.2.2=apiHelper,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
+org.apache.lucene:lucene-test-framework:10.2.2=jarValidation,testCompileClasspath,testRuntimeClasspath
org.apache.zookeeper:zookeeper-jute:3.9.3=apiHelper,compileClasspath,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testCompileClasspath,testRuntimeClasspath
org.apache.zookeeper:zookeeper:3.9.3=apiHelper,compileClasspath,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testCompileClasspath,testRuntimeClasspath
org.apiguardian:apiguardian-api:1.1.2=jarValidation,testRuntimeClasspath
diff --git a/solr/modules/gcs-repository/src/java/org/apache/solr/gcs/GCSBackupRepository.java b/solr/modules/gcs-repository/src/java/org/apache/solr/gcs/GCSBackupRepository.java
index f2b8867b1b8..3d176a5c3d2 100644
--- a/solr/modules/gcs-repository/src/java/org/apache/solr/gcs/GCSBackupRepository.java
+++ b/solr/modules/gcs-repository/src/java/org/apache/solr/gcs/GCSBackupRepository.java
@@ -344,7 +344,7 @@ public class GCSBackupRepository extends AbstractBackupRepository {
final BlobInfo blobInfo = BlobInfo.newBuilder(bucketName, blobName).build();
try (IndexInput input =
shouldVerifyChecksum
- ? sourceDir.openChecksumInput(sourceFileName, IOContext.READONCE)
+ ? sourceDir.openChecksumInput(sourceFileName)
: sourceDir.openInput(sourceFileName, IOContext.READONCE)) {
if (input.length() <= CodecUtil.footerLength()) {
throw new CorruptIndexException("file is too small:" + input.length(), input);
diff --git a/solr/modules/jwt-auth/gradle.lockfile b/solr/modules/jwt-auth/gradle.lockfile
index 6b86bfd4eaf..81713e47272 100644
--- a/solr/modules/jwt-auth/gradle.lockfile
+++ b/solr/modules/jwt-auth/gradle.lockfile
@@ -24,7 +24,6 @@ com.google.errorprone:error_prone_annotations:2.31.0=annotationProcessor,compile
com.google.errorprone:error_prone_check_api:2.31.0=annotationProcessor,errorprone,testAnnotationProcessor
com.google.errorprone:error_prone_core:2.31.0=annotationProcessor,errorprone,testAnnotationProcessor
com.google.errorprone:error_prone_type_annotations:2.31.0=annotationProcessor,errorprone,testAnnotationProcessor
-com.google.errorprone:javac:9+181-r4173-1=errorproneJavac
com.google.guava:failureaccess:1.0.2=annotationProcessor,compileClasspath,errorprone,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testAnnotationProcessor,testCompileClasspath,testRuntimeClasspath
com.google.guava:guava:33.1.0-jre=annotationProcessor,compileClasspath,errorprone,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testAnnotationProcessor,testCompileClasspath,testRuntimeClasspath
com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava=annotationProcessor,compileClasspath,errorprone,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testAnnotationProcessor,testCompileClasspath,testRuntimeClasspath
@@ -43,7 +42,8 @@ com.squareup.okio:okio-jvm:3.6.0=jarValidation,testCompileClasspath,testRuntimeC
com.squareup.okio:okio:3.6.0=jarValidation,testCompileClasspath,testRuntimeClasspath
com.tdunning:t-digest:3.3=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
commons-cli:commons-cli:1.9.0=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
-commons-codec:commons-codec:1.17.1=compileClasspath,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testCompileClasspath,testRuntimeClasspath
+commons-codec:commons-codec:1.17.1=compileClasspath,testCompileClasspath
+commons-codec:commons-codec:1.17.2=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
commons-io:commons-io:2.17.0=compileClasspath,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testCompileClasspath,testRuntimeClasspath
io.dropwizard.metrics:metrics-annotation:4.2.26=jarValidation,solrPlatformLibs,testRuntimeClasspath
io.dropwizard.metrics:metrics-core:4.2.26=compileClasspath,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testCompileClasspath,testRuntimeClasspath
@@ -85,7 +85,7 @@ net.bytebuddy:byte-buddy:1.17.4=jarValidation,testCompileClasspath,testRuntimeCl
net.minidev:accessors-smart:2.4.9=jarValidation,testCompileClasspath,testRuntimeClasspath
net.minidev:json-smart:2.4.10=jarValidation,testCompileClasspath,testRuntimeClasspath
no.nav.security:mock-oauth2-server:0.5.10=jarValidation,testCompileClasspath,testRuntimeClasspath
-org.antlr:antlr4-runtime:4.11.1=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
+org.antlr:antlr4-runtime:4.13.2=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
org.apache.commons:commons-exec:1.4.0=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
org.apache.commons:commons-lang3:3.15.0=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
org.apache.commons:commons-math3:3.6.1=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
@@ -101,28 +101,28 @@ org.apache.logging.log4j:log4j-core:2.21.0=jarValidation,runtimeClasspath,runtim
org.apache.logging.log4j:log4j-layout-template-json:2.21.0=solrPlatformLibs
org.apache.logging.log4j:log4j-slf4j2-impl:2.21.0=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
org.apache.logging.log4j:log4j-web:2.21.0=solrPlatformLibs
-org.apache.lucene:lucene-analysis-common:9.12.2=compileClasspath,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testCompileClasspath,testRuntimeClasspath
-org.apache.lucene:lucene-analysis-kuromoji:9.12.2=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
-org.apache.lucene:lucene-analysis-nori:9.12.2=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
-org.apache.lucene:lucene-analysis-phonetic:9.12.2=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
-org.apache.lucene:lucene-backward-codecs:9.12.2=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
-org.apache.lucene:lucene-classification:9.12.2=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
-org.apache.lucene:lucene-codecs:9.12.2=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
-org.apache.lucene:lucene-core:9.12.2=compileClasspath,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testCompileClasspath,testRuntimeClasspath
-org.apache.lucene:lucene-expressions:9.12.2=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
-org.apache.lucene:lucene-facet:9.12.2=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
-org.apache.lucene:lucene-grouping:9.12.2=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
-org.apache.lucene:lucene-highlighter:9.12.2=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
-org.apache.lucene:lucene-join:9.12.2=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
-org.apache.lucene:lucene-memory:9.12.2=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
-org.apache.lucene:lucene-misc:9.12.2=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
-org.apache.lucene:lucene-queries:9.12.2=compileClasspath,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testCompileClasspath,testRuntimeClasspath
-org.apache.lucene:lucene-queryparser:9.12.2=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
-org.apache.lucene:lucene-sandbox:9.12.2=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
-org.apache.lucene:lucene-spatial-extras:9.12.2=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
-org.apache.lucene:lucene-spatial3d:9.12.2=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
-org.apache.lucene:lucene-suggest:9.12.2=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
-org.apache.lucene:lucene-test-framework:9.12.2=jarValidation,testCompileClasspath,testRuntimeClasspath
+org.apache.lucene:lucene-analysis-common:10.2.2=compileClasspath,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testCompileClasspath,testRuntimeClasspath
+org.apache.lucene:lucene-analysis-kuromoji:10.2.2=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
+org.apache.lucene:lucene-analysis-nori:10.2.2=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
+org.apache.lucene:lucene-analysis-phonetic:10.2.2=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
+org.apache.lucene:lucene-backward-codecs:10.2.2=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
+org.apache.lucene:lucene-classification:10.2.2=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
+org.apache.lucene:lucene-codecs:10.2.2=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
+org.apache.lucene:lucene-core:10.2.2=compileClasspath,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testCompileClasspath,testRuntimeClasspath
+org.apache.lucene:lucene-expressions:10.2.2=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
+org.apache.lucene:lucene-facet:10.2.2=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
+org.apache.lucene:lucene-grouping:10.2.2=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
+org.apache.lucene:lucene-highlighter:10.2.2=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
+org.apache.lucene:lucene-join:10.2.2=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
+org.apache.lucene:lucene-memory:10.2.2=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
+org.apache.lucene:lucene-misc:10.2.2=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
+org.apache.lucene:lucene-queries:10.2.2=compileClasspath,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testCompileClasspath,testRuntimeClasspath
+org.apache.lucene:lucene-queryparser:10.2.2=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
+org.apache.lucene:lucene-sandbox:10.2.2=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
+org.apache.lucene:lucene-spatial-extras:10.2.2=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
+org.apache.lucene:lucene-spatial3d:10.2.2=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
+org.apache.lucene:lucene-suggest:10.2.2=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
+org.apache.lucene:lucene-test-framework:10.2.2=jarValidation,testCompileClasspath,testRuntimeClasspath
org.apache.zookeeper:zookeeper-jute:3.9.3=compileClasspath,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testCompileClasspath,testRuntimeClasspath
org.apache.zookeeper:zookeeper:3.9.3=compileClasspath,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testCompileClasspath,testRuntimeClasspath
org.apiguardian:apiguardian-api:1.1.2=jarValidation,testRuntimeClasspath
diff --git a/solr/modules/jwt-auth/src/test/org/apache/solr/security/jwt/JWTAuthPluginIntegrationTest.java b/solr/modules/jwt-auth/src/test/org/apache/solr/security/jwt/JWTAuthPluginIntegrationTest.java
index 8b1353dff25..85ad3529af5 100644
--- a/solr/modules/jwt-auth/src/test/org/apache/solr/security/jwt/JWTAuthPluginIntegrationTest.java
+++ b/solr/modules/jwt-auth/src/test/org/apache/solr/security/jwt/JWTAuthPluginIntegrationTest.java
@@ -56,6 +56,7 @@ import org.apache.http.entity.ByteArrayEntity;
import org.apache.http.entity.ContentType;
import org.apache.http.impl.client.CloseableHttpClient;
import org.apache.lucene.tests.mockfile.FilterPath;
+import org.apache.lucene.tests.util.LuceneTestCase.AwaitsFix;
import org.apache.solr.SolrTestCaseJ4;
import org.apache.solr.client.solrj.impl.HttpClientUtil;
import org.apache.solr.cloud.MiniSolrCloudCluster;
@@ -137,7 +138,7 @@ public class JWTAuthPluginIntegrationTest extends SolrCloudAuthTestCase {
}
@Test
- @BadApple(bugUrl = "https://issues.apache.org/jira/browse/SOLR-15484")
+ @AwaitsFix(bugUrl = "https://issues.apache.org/jira/browse/SOLR-15484")
public void mockOAuth2Server() throws Exception {
MiniSolrCloudCluster myCluster = configureClusterMockOauth(2, pemFilePath, 10000);
String baseUrl = myCluster.getRandomJetty(random()).getBaseUrl().toString();
diff --git a/solr/modules/langid/gradle.lockfile b/solr/modules/langid/gradle.lockfile
index a724a598591..04669ad57b6 100644
--- a/solr/modules/langid/gradle.lockfile
+++ b/solr/modules/langid/gradle.lockfile
@@ -23,7 +23,6 @@ com.google.errorprone:error_prone_annotations:2.31.0=annotationProcessor,compile
com.google.errorprone:error_prone_check_api:2.31.0=annotationProcessor,errorprone,testAnnotationProcessor
com.google.errorprone:error_prone_core:2.31.0=annotationProcessor,errorprone,testAnnotationProcessor
com.google.errorprone:error_prone_type_annotations:2.31.0=annotationProcessor,errorprone,testAnnotationProcessor
-com.google.errorprone:javac:9+181-r4173-1=errorproneJavac
com.google.guava:failureaccess:1.0.2=annotationProcessor,compileClasspath,errorprone,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testAnnotationProcessor,testCompileClasspath,testRuntimeClasspath
com.google.guava:guava:33.1.0-jre=annotationProcessor,compileClasspath,errorprone,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testAnnotationProcessor,testCompileClasspath,testRuntimeClasspath
com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava=annotationProcessor,compileClasspath,errorprone,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testAnnotationProcessor,testCompileClasspath,testRuntimeClasspath
@@ -34,7 +33,7 @@ com.jayway.jsonpath:json-path:2.9.0=jarValidation,runtimeClasspath,runtimeLibs,s
com.lmax:disruptor:3.4.4=solrPlatformLibs
com.tdunning:t-digest:3.3=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
commons-cli:commons-cli:1.9.0=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
-commons-codec:commons-codec:1.17.1=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
+commons-codec:commons-codec:1.17.2=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
commons-io:commons-io:2.17.0=compileClasspath,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testCompileClasspath,testRuntimeClasspath
io.dropwizard.metrics:metrics-annotation:4.2.26=jarValidation,solrPlatformLibs,testRuntimeClasspath
io.dropwizard.metrics:metrics-core:4.2.26=compileClasspath,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testCompileClasspath,testRuntimeClasspath
@@ -70,7 +69,7 @@ jakarta.ws.rs:jakarta.ws.rs-api:3.1.0=jarValidation,runtimeClasspath,runtimeLibs
javax.inject:javax.inject:1=annotationProcessor,errorprone,testAnnotationProcessor
junit:junit:4.13.2=jarValidation,testCompileClasspath,testRuntimeClasspath
net.arnx:jsonic:1.2.7=compileClasspath,jarValidation,runtimeClasspath,runtimeLibs,testCompileClasspath,testRuntimeClasspath
-org.antlr:antlr4-runtime:4.11.1=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
+org.antlr:antlr4-runtime:4.13.2=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
org.apache.commons:commons-exec:1.4.0=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
org.apache.commons:commons-lang3:3.15.0=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
org.apache.commons:commons-math3:3.6.1=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
@@ -86,29 +85,29 @@ org.apache.logging.log4j:log4j-core:2.21.0=jarValidation,runtimeClasspath,runtim
org.apache.logging.log4j:log4j-layout-template-json:2.21.0=solrPlatformLibs
org.apache.logging.log4j:log4j-slf4j2-impl:2.21.0=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
org.apache.logging.log4j:log4j-web:2.21.0=solrPlatformLibs
-org.apache.lucene:lucene-analysis-common:9.12.2=compileClasspath,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testCompileClasspath,testRuntimeClasspath
-org.apache.lucene:lucene-analysis-kuromoji:9.12.2=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
-org.apache.lucene:lucene-analysis-nori:9.12.2=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
-org.apache.lucene:lucene-analysis-phonetic:9.12.2=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
-org.apache.lucene:lucene-backward-codecs:9.12.2=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
-org.apache.lucene:lucene-classification:9.12.2=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
-org.apache.lucene:lucene-codecs:9.12.2=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
-org.apache.lucene:lucene-core:9.12.2=compileClasspath,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testCompileClasspath,testRuntimeClasspath
-org.apache.lucene:lucene-expressions:9.12.2=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
-org.apache.lucene:lucene-facet:9.12.2=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
-org.apache.lucene:lucene-grouping:9.12.2=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
-org.apache.lucene:lucene-highlighter:9.12.2=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
-org.apache.lucene:lucene-join:9.12.2=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
-org.apache.lucene:lucene-memory:9.12.2=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
-org.apache.lucene:lucene-misc:9.12.2=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
-org.apache.lucene:lucene-queries:9.12.2=compileClasspath,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testCompileClasspath,testRuntimeClasspath
-org.apache.lucene:lucene-queryparser:9.12.2=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
-org.apache.lucene:lucene-sandbox:9.12.2=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
-org.apache.lucene:lucene-spatial-extras:9.12.2=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
-org.apache.lucene:lucene-spatial3d:9.12.2=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
-org.apache.lucene:lucene-suggest:9.12.2=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
-org.apache.lucene:lucene-test-framework:9.12.2=jarValidation,testCompileClasspath,testRuntimeClasspath
-org.apache.opennlp:opennlp-tools:1.9.4=compileClasspath,jarValidation,runtimeClasspath,runtimeLibs,testCompileClasspath,testRuntimeClasspath
+org.apache.lucene:lucene-analysis-common:10.2.2=compileClasspath,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testCompileClasspath,testRuntimeClasspath
+org.apache.lucene:lucene-analysis-kuromoji:10.2.2=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
+org.apache.lucene:lucene-analysis-nori:10.2.2=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
+org.apache.lucene:lucene-analysis-phonetic:10.2.2=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
+org.apache.lucene:lucene-backward-codecs:10.2.2=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
+org.apache.lucene:lucene-classification:10.2.2=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
+org.apache.lucene:lucene-codecs:10.2.2=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
+org.apache.lucene:lucene-core:10.2.2=compileClasspath,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testCompileClasspath,testRuntimeClasspath
+org.apache.lucene:lucene-expressions:10.2.2=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
+org.apache.lucene:lucene-facet:10.2.2=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
+org.apache.lucene:lucene-grouping:10.2.2=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
+org.apache.lucene:lucene-highlighter:10.2.2=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
+org.apache.lucene:lucene-join:10.2.2=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
+org.apache.lucene:lucene-memory:10.2.2=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
+org.apache.lucene:lucene-misc:10.2.2=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
+org.apache.lucene:lucene-queries:10.2.2=compileClasspath,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testCompileClasspath,testRuntimeClasspath
+org.apache.lucene:lucene-queryparser:10.2.2=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
+org.apache.lucene:lucene-sandbox:10.2.2=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
+org.apache.lucene:lucene-spatial-extras:10.2.2=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
+org.apache.lucene:lucene-spatial3d:10.2.2=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
+org.apache.lucene:lucene-suggest:10.2.2=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
+org.apache.lucene:lucene-test-framework:10.2.2=jarValidation,testCompileClasspath,testRuntimeClasspath
+org.apache.opennlp:opennlp-tools:2.5.3=compileClasspath,jarValidation,runtimeClasspath,runtimeLibs,testCompileClasspath,testRuntimeClasspath
org.apache.tika:tika-core:1.28.5=compileClasspath,jarValidation,runtimeClasspath,runtimeLibs,testCompileClasspath,testRuntimeClasspath
org.apache.zookeeper:zookeeper-jute:3.9.3=compileClasspath,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testCompileClasspath,testRuntimeClasspath
org.apache.zookeeper:zookeeper:3.9.3=compileClasspath,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testCompileClasspath,testRuntimeClasspath
diff --git a/solr/modules/llm/gradle.lockfile b/solr/modules/llm/gradle.lockfile
index ee524903df2..f76249cf76c 100644
--- a/solr/modules/llm/gradle.lockfile
+++ b/solr/modules/llm/gradle.lockfile
@@ -24,7 +24,6 @@ com.google.errorprone:error_prone_annotations:2.31.0=annotationProcessor,compile
com.google.errorprone:error_prone_check_api:2.31.0=annotationProcessor,errorprone,testAnnotationProcessor
com.google.errorprone:error_prone_core:2.31.0=annotationProcessor,errorprone,testAnnotationProcessor
com.google.errorprone:error_prone_type_annotations:2.31.0=annotationProcessor,errorprone,testAnnotationProcessor
-com.google.errorprone:javac:9+181-r4173-1=errorproneJavac
com.google.guava:failureaccess:1.0.2=annotationProcessor,compileClasspath,errorprone,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testAnnotationProcessor,testCompileClasspath,testRuntimeClasspath
com.google.guava:guava:33.1.0-jre=annotationProcessor,compileClasspath,errorprone,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testAnnotationProcessor,testCompileClasspath,testRuntimeClasspath
com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava=annotationProcessor,compileClasspath,errorprone,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testAnnotationProcessor,testCompileClasspath,testRuntimeClasspath
@@ -42,7 +41,7 @@ com.squareup.retrofit2:converter-jackson:2.9.0=jarValidation,runtimeClasspath,ru
com.squareup.retrofit2:retrofit:2.9.0=jarValidation,runtimeClasspath,runtimeLibs,testRuntimeClasspath
com.tdunning:t-digest:3.3=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
commons-cli:commons-cli:1.9.0=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
-commons-codec:commons-codec:1.17.1=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
+commons-codec:commons-codec:1.17.2=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
commons-io:commons-io:2.17.0=compileClasspath,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testCompileClasspath,testRuntimeClasspath
dev.ai4j:openai4j:0.22.0=jarValidation,runtimeClasspath,runtimeLibs,testRuntimeClasspath
dev.langchain4j:langchain4j-cohere:0.35.0=jarValidation,runtimeClasspath,runtimeLibs,testRuntimeClasspath
@@ -83,7 +82,7 @@ jakarta.validation:jakarta.validation-api:3.0.2=jarValidation,runtimeClasspath,r
jakarta.ws.rs:jakarta.ws.rs-api:3.1.0=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
javax.inject:javax.inject:1=annotationProcessor,errorprone,testAnnotationProcessor
junit:junit:4.13.2=jarValidation,testCompileClasspath,testRuntimeClasspath
-org.antlr:antlr4-runtime:4.11.1=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
+org.antlr:antlr4-runtime:4.13.2=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
org.apache.commons:commons-exec:1.4.0=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
org.apache.commons:commons-lang3:3.15.0=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
org.apache.commons:commons-math3:3.6.1=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
@@ -99,28 +98,28 @@ org.apache.logging.log4j:log4j-core:2.21.0=jarValidation,runtimeClasspath,runtim
org.apache.logging.log4j:log4j-layout-template-json:2.21.0=solrPlatformLibs
org.apache.logging.log4j:log4j-slf4j2-impl:2.21.0=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
org.apache.logging.log4j:log4j-web:2.21.0=solrPlatformLibs
-org.apache.lucene:lucene-analysis-common:9.12.2=compileClasspath,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testCompileClasspath,testRuntimeClasspath
-org.apache.lucene:lucene-analysis-kuromoji:9.12.2=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
-org.apache.lucene:lucene-analysis-nori:9.12.2=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
-org.apache.lucene:lucene-analysis-phonetic:9.12.2=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
-org.apache.lucene:lucene-backward-codecs:9.12.2=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
-org.apache.lucene:lucene-classification:9.12.2=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
-org.apache.lucene:lucene-codecs:9.12.2=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
-org.apache.lucene:lucene-core:9.12.2=compileClasspath,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testCompileClasspath,testRuntimeClasspath
-org.apache.lucene:lucene-expressions:9.12.2=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
-org.apache.lucene:lucene-facet:9.12.2=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
-org.apache.lucene:lucene-grouping:9.12.2=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
-org.apache.lucene:lucene-highlighter:9.12.2=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
-org.apache.lucene:lucene-join:9.12.2=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
-org.apache.lucene:lucene-memory:9.12.2=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
-org.apache.lucene:lucene-misc:9.12.2=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
-org.apache.lucene:lucene-queries:9.12.2=compileClasspath,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testCompileClasspath,testRuntimeClasspath
-org.apache.lucene:lucene-queryparser:9.12.2=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
-org.apache.lucene:lucene-sandbox:9.12.2=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
-org.apache.lucene:lucene-spatial-extras:9.12.2=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
-org.apache.lucene:lucene-spatial3d:9.12.2=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
-org.apache.lucene:lucene-suggest:9.12.2=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
-org.apache.lucene:lucene-test-framework:9.12.2=jarValidation,testCompileClasspath,testRuntimeClasspath
+org.apache.lucene:lucene-analysis-common:10.2.2=compileClasspath,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testCompileClasspath,testRuntimeClasspath
+org.apache.lucene:lucene-analysis-kuromoji:10.2.2=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
+org.apache.lucene:lucene-analysis-nori:10.2.2=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
+org.apache.lucene:lucene-analysis-phonetic:10.2.2=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
+org.apache.lucene:lucene-backward-codecs:10.2.2=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
+org.apache.lucene:lucene-classification:10.2.2=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
+org.apache.lucene:lucene-codecs:10.2.2=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
+org.apache.lucene:lucene-core:10.2.2=compileClasspath,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testCompileClasspath,testRuntimeClasspath
+org.apache.lucene:lucene-expressions:10.2.2=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
+org.apache.lucene:lucene-facet:10.2.2=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
+org.apache.lucene:lucene-grouping:10.2.2=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
+org.apache.lucene:lucene-highlighter:10.2.2=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
+org.apache.lucene:lucene-join:10.2.2=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
+org.apache.lucene:lucene-memory:10.2.2=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
+org.apache.lucene:lucene-misc:10.2.2=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
+org.apache.lucene:lucene-queries:10.2.2=compileClasspath,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testCompileClasspath,testRuntimeClasspath
+org.apache.lucene:lucene-queryparser:10.2.2=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
+org.apache.lucene:lucene-sandbox:10.2.2=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
+org.apache.lucene:lucene-spatial-extras:10.2.2=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
+org.apache.lucene:lucene-spatial3d:10.2.2=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
+org.apache.lucene:lucene-suggest:10.2.2=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
+org.apache.lucene:lucene-test-framework:10.2.2=jarValidation,testCompileClasspath,testRuntimeClasspath
org.apache.zookeeper:zookeeper-jute:3.9.3=compileClasspath,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testCompileClasspath,testRuntimeClasspath
org.apache.zookeeper:zookeeper:3.9.3=compileClasspath,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testCompileClasspath,testRuntimeClasspath
org.apiguardian:apiguardian-api:1.1.2=jarValidation,testRuntimeClasspath
diff --git a/solr/modules/llm/src/java/org/apache/solr/llm/textvectorisation/model/SolrTextToVectorModel.java b/solr/modules/llm/src/java/org/apache/solr/llm/textvectorisation/model/SolrTextToVectorModel.java
index 9a22087b990..8e2ad3e0322 100644
--- a/solr/modules/llm/src/java/org/apache/solr/llm/textvectorisation/model/SolrTextToVectorModel.java
+++ b/solr/modules/llm/src/java/org/apache/solr/llm/textvectorisation/model/SolrTextToVectorModel.java
@@ -89,15 +89,16 @@ public class SolrTextToVectorModel implements Accountable {
Duration timeOut = Duration.ofSeconds((Long) params.get(paramName));
builder.getClass().getMethod(paramName, Duration.class).invoke(builder, timeOut);
}
- case MAX_SEGMENTS_PER_BATCH_PARAM, MAX_RETRIES_PARAM -> builder
- .getClass()
- .getMethod(paramName, Integer.class)
- .invoke(builder, ((Long) params.get(paramName)).intValue());
+ case MAX_SEGMENTS_PER_BATCH_PARAM, MAX_RETRIES_PARAM ->
+ builder
+ .getClass()
+ .getMethod(paramName, Integer.class)
+ .invoke(builder, ((Long) params.get(paramName)).intValue());
- /*
- * For primitive params if there's only one setter available, we call it.
- * If there's choice we default to the string one
- */
+ /*
+ * For primitive params if there's only one setter available, we call it.
+ * If there's choice we default to the string one
+ */
default -> {
ArrayList<Method> paramNameMatches = new ArrayList<>();
for (var method : builder.getClass().getMethods()) {
diff --git a/solr/modules/ltr/gradle.lockfile b/solr/modules/ltr/gradle.lockfile
index 9c43b26bf3c..396cf2fcc85 100644
--- a/solr/modules/ltr/gradle.lockfile
+++ b/solr/modules/ltr/gradle.lockfile
@@ -22,7 +22,6 @@ com.google.errorprone:error_prone_annotations:2.31.0=annotationProcessor,compile
com.google.errorprone:error_prone_check_api:2.31.0=annotationProcessor,errorprone,testAnnotationProcessor
com.google.errorprone:error_prone_core:2.31.0=annotationProcessor,errorprone,testAnnotationProcessor
com.google.errorprone:error_prone_type_annotations:2.31.0=annotationProcessor,errorprone,testAnnotationProcessor
-com.google.errorprone:javac:9+181-r4173-1=errorproneJavac
com.google.guava:failureaccess:1.0.2=annotationProcessor,compileClasspath,errorprone,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testAnnotationProcessor,testCompileClasspath,testRuntimeClasspath
com.google.guava:guava:33.1.0-jre=annotationProcessor,compileClasspath,errorprone,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testAnnotationProcessor,testCompileClasspath,testRuntimeClasspath
com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava=annotationProcessor,compileClasspath,errorprone,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testAnnotationProcessor,testCompileClasspath,testRuntimeClasspath
@@ -33,7 +32,7 @@ com.jayway.jsonpath:json-path:2.9.0=jarValidation,runtimeClasspath,runtimeLibs,s
com.lmax:disruptor:3.4.4=solrPlatformLibs
com.tdunning:t-digest:3.3=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
commons-cli:commons-cli:1.9.0=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
-commons-codec:commons-codec:1.17.1=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
+commons-codec:commons-codec:1.17.2=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
commons-io:commons-io:2.17.0=compileClasspath,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testCompileClasspath,testRuntimeClasspath
io.dropwizard.metrics:metrics-annotation:4.2.26=jarValidation,solrPlatformLibs,testRuntimeClasspath
io.dropwizard.metrics:metrics-core:4.2.26=compileClasspath,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testCompileClasspath,testRuntimeClasspath
@@ -69,7 +68,7 @@ jakarta.ws.rs:jakarta.ws.rs-api:3.1.0=jarValidation,runtimeClasspath,runtimeLibs
javax.inject:javax.inject:1=annotationProcessor,errorprone,testAnnotationProcessor
junit:junit:4.13.2=jarValidation,testCompileClasspath,testRuntimeClasspath
net.bytebuddy:byte-buddy:1.17.4=jarValidation,testCompileClasspath,testRuntimeClasspath
-org.antlr:antlr4-runtime:4.11.1=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
+org.antlr:antlr4-runtime:4.13.2=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
org.apache.commons:commons-exec:1.4.0=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
org.apache.commons:commons-lang3:3.15.0=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
org.apache.commons:commons-math3:3.6.1=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
@@ -85,28 +84,28 @@ org.apache.logging.log4j:log4j-core:2.21.0=jarValidation,runtimeClasspath,runtim
org.apache.logging.log4j:log4j-layout-template-json:2.21.0=solrPlatformLibs
org.apache.logging.log4j:log4j-slf4j2-impl:2.21.0=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
org.apache.logging.log4j:log4j-web:2.21.0=solrPlatformLibs
-org.apache.lucene:lucene-analysis-common:9.12.2=compileClasspath,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testCompileClasspath,testRuntimeClasspath
-org.apache.lucene:lucene-analysis-kuromoji:9.12.2=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
-org.apache.lucene:lucene-analysis-nori:9.12.2=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
-org.apache.lucene:lucene-analysis-phonetic:9.12.2=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
-org.apache.lucene:lucene-backward-codecs:9.12.2=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
-org.apache.lucene:lucene-classification:9.12.2=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
-org.apache.lucene:lucene-codecs:9.12.2=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
-org.apache.lucene:lucene-core:9.12.2=compileClasspath,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testCompileClasspath,testRuntimeClasspath
-org.apache.lucene:lucene-expressions:9.12.2=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
-org.apache.lucene:lucene-facet:9.12.2=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
-org.apache.lucene:lucene-grouping:9.12.2=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
-org.apache.lucene:lucene-highlighter:9.12.2=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
-org.apache.lucene:lucene-join:9.12.2=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
-org.apache.lucene:lucene-memory:9.12.2=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
-org.apache.lucene:lucene-misc:9.12.2=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
-org.apache.lucene:lucene-queries:9.12.2=compileClasspath,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testCompileClasspath,testRuntimeClasspath
-org.apache.lucene:lucene-queryparser:9.12.2=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
-org.apache.lucene:lucene-sandbox:9.12.2=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
-org.apache.lucene:lucene-spatial-extras:9.12.2=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
-org.apache.lucene:lucene-spatial3d:9.12.2=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
-org.apache.lucene:lucene-suggest:9.12.2=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
-org.apache.lucene:lucene-test-framework:9.12.2=jarValidation,testCompileClasspath,testRuntimeClasspath
+org.apache.lucene:lucene-analysis-common:10.2.2=compileClasspath,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testCompileClasspath,testRuntimeClasspath
+org.apache.lucene:lucene-analysis-kuromoji:10.2.2=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
+org.apache.lucene:lucene-analysis-nori:10.2.2=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
+org.apache.lucene:lucene-analysis-phonetic:10.2.2=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
+org.apache.lucene:lucene-backward-codecs:10.2.2=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
+org.apache.lucene:lucene-classification:10.2.2=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
+org.apache.lucene:lucene-codecs:10.2.2=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
+org.apache.lucene:lucene-core:10.2.2=compileClasspath,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testCompileClasspath,testRuntimeClasspath
+org.apache.lucene:lucene-expressions:10.2.2=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
+org.apache.lucene:lucene-facet:10.2.2=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
+org.apache.lucene:lucene-grouping:10.2.2=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
+org.apache.lucene:lucene-highlighter:10.2.2=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
+org.apache.lucene:lucene-join:10.2.2=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
+org.apache.lucene:lucene-memory:10.2.2=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
+org.apache.lucene:lucene-misc:10.2.2=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
+org.apache.lucene:lucene-queries:10.2.2=compileClasspath,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testCompileClasspath,testRuntimeClasspath
+org.apache.lucene:lucene-queryparser:10.2.2=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
+org.apache.lucene:lucene-sandbox:10.2.2=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
+org.apache.lucene:lucene-spatial-extras:10.2.2=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
+org.apache.lucene:lucene-spatial3d:10.2.2=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
+org.apache.lucene:lucene-suggest:10.2.2=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath
+org.apache.lucene:lucene-test-framework:10.2.2=jarValidation,testCompileClasspath,testRuntimeClasspath
org.apache.zookeeper:zookeeper-jute:3.9.3=compileClasspath,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testCompileClasspath,testRuntimeClasspath
org.apache.zookeeper:zookeeper:3.9.3=compileClasspath,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testCompileClasspath,testRuntimeClasspath
org.apiguardian:apiguardian-api:1.1.2=jarValidation,testRuntimeClasspath
diff --git a/solr/modules/ltr/src/java/org/apache/solr/ltr/LTRRescorer.java b/solr/modules/ltr/src/java/org/apache/solr/ltr/LTRRescorer.java
index a6b45342d9e..a21c107438c 100644
--- a/solr/modules/ltr/src/java/org/apache/solr/ltr/LTRRescorer.java
+++ b/solr/modules/ltr/src/java/org/apache/solr/ltr/LTRRescorer.java
@@ -123,7 +123,7 @@ public class LTRRescorer extends Rescorer {
return firstPassTopDocs;
}
final ScoreDoc[] firstPassResults = getFirstPassDocsRanked(firstPassTopDocs);
- topN = Math.toIntExact(Math.min(topN, firstPassTopDocs.totalHits.value));
+ topN = Math.toIntExact(Math.min(topN, firstPassTopDocs.totalHits.value()));
final ScoreDoc[] reranked = rerank(searcher, topN, firstPassResults);
@@ -148,7 +148,7 @@ public class LTRRescorer extends Rescorer {
final ScoreDoc[] hits = firstPassTopDocs.scoreDocs;
Arrays.sort(hits, docComparator);
- assert firstPassTopDocs.totalHits.relation == TotalHits.Relation.EQUAL_TO;
+ assert firstPassTopDocs.totalHits.relation() == TotalHits.Relation.EQUAL_TO;
return hits;
}
@@ -180,7 +180,7 @@ public class LTRRescorer extends Rescorer {
// We advanced to another segment
if (readerContext != null) {
docBase = readerContext.docBase;
- scorer = modelWeight.scorer(readerContext);
+ scorer = modelWeight.modelScorer(readerContext);
}
if (scoreSingleHit(topN, docBase, hitUpto, hit, docID, scorer, reranked)) {
logSingleHit(indexSearcher, modelWeight, hit.doc, scoringQuery);
@@ -299,7 +299,7 @@ public class LTRRescorer extends Rescorer {
final int n = ReaderUtil.subIndex(docid, leafContexts);
final LeafReaderContext atomicContext = leafContexts.get(n);
final int deBasedDoc = docid - atomicContext.docBase;
- final LTRScoringQuery.ModelWeight.ModelScorer r = modelWeight.scorer(atomicContext);
+ final LTRScoringQuery.ModelWeight.ModelScorer r = modelWeight.modelScorer(atomicContext);
if ((r == null) || (r.iterator().advance(deBasedDoc) != deBasedDoc)) {
return new LTRScoringQuery.FeatureInfo[0];
} else {
diff --git a/solr/modules/ltr/src/java/org/apache/solr/ltr/LTRScoringQuery.java b/solr/modules/ltr/src/java/org/apache/solr/ltr/LTRScoringQuery.java
index 0ce2e21217d..6a30c9de999 100644
--- a/solr/modules/ltr/src/java/org/apache/solr/ltr/LTRScoringQuery.java
+++ b/solr/modules/ltr/src/java/org/apache/solr/ltr/LTRScoringQuery.java
@@ -1,10 +1,11 @@
/*
- * 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
+ * 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
*
@@ -14,6 +15,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
+
package org.apache.solr.ltr;
import java.io.IOException;
@@ -24,15 +26,14 @@ import java.util.Collection;
import java.util.Collections;
import java.util.List;
import java.util.Map;
-import java.util.concurrent.Callable;
+import java.util.concurrent.ExecutionException;
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.Executors;
import java.util.concurrent.Future;
-import java.util.concurrent.FutureTask;
-import java.util.concurrent.RunnableFuture;
import java.util.concurrent.Semaphore;
import org.apache.lucene.index.LeafReaderContext;
import org.apache.lucene.search.DisiPriorityQueue;
import org.apache.lucene.search.DisiWrapper;
-import org.apache.lucene.search.DisjunctionDISIApproximation;
import org.apache.lucene.search.DocIdSetIterator;
import org.apache.lucene.search.Explanation;
import org.apache.lucene.search.IndexSearcher;
@@ -40,6 +41,7 @@ import org.apache.lucene.search.Query;
import org.apache.lucene.search.QueryVisitor;
import org.apache.lucene.search.ScoreMode;
import org.apache.lucene.search.Scorer;
+import org.apache.lucene.search.ScorerSupplier;
import org.apache.lucene.search.Weight;
import org.apache.lucene.util.Accountable;
import org.apache.lucene.util.RamUsageEstimator;
@@ -49,43 +51,48 @@ import org.apache.solr.request.SolrQueryRequest;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-/** The ranking query that is run, reranking results using the LTRScoringModel algorithm */
+/**
+ * Reranks a result set using an {@link LTRScoringModel}.
+ *
+ * <p>This implementation:
+ *
+ * <ul>
+ * <li>Builds feature weights using Java 21 <strong>virtual threads</strong> with a per-request
+ * semaphore for bounded parallelism (no pool lifecycle overhead).
+ * <li>Stores per-document feature values in primitive arrays to minimise GC and improve cache
+ * locality.
+ * <li>Keeps {@link DocInfo} as a {@code HashMap<String,Object>} subclass for compatibility with
+ * existing feature code.
+ * <li>Initialises the sparse iterator following the Lucene 10 fix semantics.
+ * </ul>
+ */
public class LTRScoringQuery extends Query implements Accountable {
private static final Logger log = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
-
private static final long BASE_RAM_BYTES =
RamUsageEstimator.shallowSizeOfInstance(LTRScoringQuery.class);
- // contains a description of the model
- private final LTRScoringModel ltrScoringModel;
- private final LTRThreadModule ltrThreadMgr;
-
- // limits the number of threads per query, so that multiple requests can be serviced
- // simultaneously
- private final Semaphore querySemaphore;
-
- // feature logger to output the features.
- private FeatureLogger logger;
- // Map of external parameters, such as query intent, that can be used by
- // features
- private final Map<String, String[]> efi;
- // Original solr query used to fetch matching documents
- private Query originalQuery;
- // Original solr request
- private SolrQueryRequest request;
-
- public LTRScoringQuery(LTRScoringModel ltrScoringModel) {
- this(ltrScoringModel, Collections.<String, String[]>emptyMap(), null);
+ // ---------------- immutable config ----------------
+ protected final LTRScoringModel ltrScoringModel;
+ protected final LTRThreadModule ltrThreadMgr; // optional
+ protected final Map<String, String[]> efi; // external feature info
+ protected final Semaphore querySemaphore; // backwards compat
+
+ // ---------------- per‑request hooks ---------------
+ protected volatile Query originalQuery;
+ protected volatile SolrQueryRequest request;
+ protected volatile FeatureLogger logger;
+
+ /* ---------------- constructors ------------------- */
+ public LTRScoringQuery(LTRScoringModel model) {
+ this(model, Collections.emptyMap(), null);
}
public LTRScoringQuery(
- LTRScoringModel ltrScoringModel,
- Map<String, String[]> externalFeatureInfo,
- LTRThreadModule ltrThreadMgr) {
- this.ltrScoringModel = ltrScoringModel;
+ LTRScoringModel model, Map<String, String[]> externalFeatureInfo, LTRThreadModule threadMgr) {
+ this.ltrScoringModel = model;
this.efi = externalFeatureInfo;
- this.ltrThreadMgr = ltrThreadMgr;
+ this.ltrThreadMgr = threadMgr;
if (this.ltrThreadMgr != null) {
this.querySemaphore = this.ltrThreadMgr.createQuerySemaphore();
} else {
@@ -93,6 +100,7 @@ public class LTRScoringQuery extends Query implements Accountable {
}
}
... 2302 lines suppressed ...