You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@solr.apache.org by is...@apache.org on 2025/01/15 21:26:08 UTC

(solr) branch ishan/upgrade-to-lucene-10 updated: More fixes

This is an automated email from the ASF dual-hosted git repository.

ishan pushed a commit to branch ishan/upgrade-to-lucene-10
in repository https://gitbox.apache.org/repos/asf/solr.git


The following commit(s) were added to refs/heads/ishan/upgrade-to-lucene-10 by this push:
     new 8b24db88e40 More fixes
8b24db88e40 is described below

commit 8b24db88e40e74e347ecc7e7278092593cb9d394
Author: Ishan Chattopadhyaya <is...@apache.org>
AuthorDate: Thu Jan 16 02:55:54 2025 +0530

    More fixes
---
 .../java/org/apache/solr/core/backup/repository/BackupRepository.java | 4 ++--
 .../src/java/org/apache/solr/handler/component/ExpandComponent.java   | 4 ++--
 solr/core/src/java/org/apache/solr/search/FunctionRangeQuery.java     | 1 -
 .../core/src/java/org/apache/solr/search/GraphTermsQParserPlugin.java | 4 ++--
 4 files changed, 6 insertions(+), 7 deletions(-)

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/component/ExpandComponent.java b/solr/core/src/java/org/apache/solr/handler/component/ExpandComponent.java
index 736fe02bdb7..b7bbd466089 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
@@ -847,7 +847,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) {
@@ -889,7 +889,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/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 634af17f5c0..7657018949c 100644
--- a/solr/core/src/java/org/apache/solr/search/GraphTermsQParserPlugin.java
+++ b/solr/core/src/java/org/apache/solr/search/GraphTermsQParserPlugin.java
@@ -252,10 +252,10 @@ public class GraphTermsQParserPlugin extends QParserPlugin {
           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);
+            TermState termState = ts.get(context).get();
             if (termState != null) {
               Term term = finalTerms.get(i);
-              termsEnum.seekExact(term.bytes(), ts.get(context));
+              termsEnum.seekExact(term.bytes(), ts.get(context).get());
               docs = termsEnum.postings(docs, PostingsEnum.NONE);
               builder.add(docs);
             }