This is an automated email from the ASF dual-hosted git repository.
abenedetti pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/solr.git
The following commit(s) were added to refs/heads/main by this push:
new 2a03deee649 removing explicit check on outputField in
TextToVectorUpdateProcessorFactory.java, check is already done by late… (#3666)
2a03deee649 is described below
commit 2a03deee649111f8aa2a81e880f0e3fe64377444
Author: Renato Haeberli <[email protected]>
AuthorDate: Fri Sep 19 11:51:20 2025 +0200
removing explicit check on outputField in
TextToVectorUpdateProcessorFactory.java, check is already done by late… (#3666)
* removing explicit check on outputField, check is already done by
latestSchema.getField
* updating changes.txt
---
solr/CHANGES.txt | 2 ++
.../update/processor/TextToVectorUpdateProcessorFactory.java | 4 ----
2 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt
index ed4924a39ea..0584672fa1c 100644
--- a/solr/CHANGES.txt
+++ b/solr/CHANGES.txt
@@ -61,6 +61,8 @@ Improvements
* Minor refactoring of the TextToVectorQParserPlugin (Ilaria Petreti via
Alessandro Benedetti)
+* GITHUB#3666: Removing redundant check if field exists in
TextToVectorUpdateProcessorFactory (Renato Haeberli via Alessandro Benedetti)
+
Optimizations
---------------------
* SOLR-17568: The CLI bin/solr export tool now contacts the appropriate nodes
directly for data instead of proxying through one.
diff --git
a/solr/modules/llm/src/java/org/apache/solr/llm/textvectorisation/update/processor/TextToVectorUpdateProcessorFactory.java
b/solr/modules/llm/src/java/org/apache/solr/llm/textvectorisation/update/processor/TextToVectorUpdateProcessorFactory.java
index 07653df62dd..c4f7ea2924f 100644
---
a/solr/modules/llm/src/java/org/apache/solr/llm/textvectorisation/update/processor/TextToVectorUpdateProcessorFactory.java
+++
b/solr/modules/llm/src/java/org/apache/solr/llm/textvectorisation/update/processor/TextToVectorUpdateProcessorFactory.java
@@ -76,10 +76,6 @@ public class TextToVectorUpdateProcessorFactory extends
UpdateRequestProcessorFa
SolrException.ErrorCode.SERVER_ERROR, "undefined field: \"" +
inputField + "\"");
}
- if (!latestSchema.isDynamicField(outputField) &&
!latestSchema.hasExplicitField(outputField)) {
- throw new SolrException(
- SolrException.ErrorCode.SERVER_ERROR, "undefined field: \"" +
outputField + "\"");
- }
final SchemaField outputFieldSchema = latestSchema.getField(outputField);
assertIsDenseVectorField(outputFieldSchema);