You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@solr.apache.org by ho...@apache.org on 2026/01/16 00:09:37 UTC
(solr) 02/06: We don't need the whole SchemaField here, the name and FieldType are enough
This is an automated email from the ASF dual-hosted git repository.
hossman pushed a commit to branch jira/SOLR-17975
in repository https://gitbox.apache.org/repos/asf/solr.git
commit 0d215d86276ab86950596ed104f044a60be5c42a
Author: Chris Hostetter <ho...@apache.org>
AuthorDate: Thu Jan 15 11:48:23 2026 -0700
We don't need the whole SchemaField here, the name and FieldType are enough
---
.../src/java/org/apache/solr/schema/LateInteractionVectorField.java | 4 ++--
solr/core/src/java/org/apache/solr/search/ValueSourceParser.java | 6 +++---
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/solr/core/src/java/org/apache/solr/schema/LateInteractionVectorField.java b/solr/core/src/java/org/apache/solr/schema/LateInteractionVectorField.java
index d0aa0ee98e3..e00e47bd02a 100644
--- a/solr/core/src/java/org/apache/solr/schema/LateInteractionVectorField.java
+++ b/solr/core/src/java/org/apache/solr/schema/LateInteractionVectorField.java
@@ -128,9 +128,9 @@ public class LateInteractionVectorField extends FieldType {
}
public DoubleValuesSource getMultiVecSimilarityValueSource(
- final SchemaField f, final String vecStr) throws SyntaxError {
+ final String fieldName, final String vecStr) throws SyntaxError {
return new LateInteractionFloatValuesSource(
- f.getName(),
+ fieldName,
stringToMultiFloatVector(dimension, vecStr),
getSimilarityFunction(),
getScoreFunction());
diff --git a/solr/core/src/java/org/apache/solr/search/ValueSourceParser.java b/solr/core/src/java/org/apache/solr/search/ValueSourceParser.java
index bbd9387e0b0..b8b2251af1b 100644
--- a/solr/core/src/java/org/apache/solr/search/ValueSourceParser.java
+++ b/solr/core/src/java/org/apache/solr/search/ValueSourceParser.java
@@ -1376,10 +1376,10 @@ public abstract class ValueSourceParser implements NamedListInitializedPlugin {
SolrException.ErrorCode.BAD_REQUEST,
"Invalid number of arguments. Please provide both a field name, and a (String) multi-vector.");
}
- final SchemaField sf = fp.getReq().getSchema().getField(fieldName);
- if (sf.getType() instanceof LateInteractionVectorField lif) {
+ final FieldType ft = fp.getReq().getSchema().getFieldType(fieldName);
+ if (ft instanceof LateInteractionVectorField lift) {
return ValueSource.fromDoubleValuesSource(
- lif.getMultiVecSimilarityValueSource(sf, vecStr));
+ lift.getMultiVecSimilarityValueSource(fieldName, vecStr));
}
throw new SolrException(
SolrException.ErrorCode.BAD_REQUEST,