linslee75 commented on code in PR #5305:
URL: https://github.com/apache/solr/pull/5305#discussion_r4492330534
##########
solr/core/src/java/org/apache/solr/schema/StrField.java:
##########
@@ -64,7 +64,7 @@ public List<IndexableField> createFields(SchemaField field,
Object value) {
fval = docval;
}
- return List.of(fval);
+ return fval == null ? List.of() : List.of(fval);
Review Comment:
FieldType.createFields already does `f == null ? List.of() : List.of(f)`,
and SOLR-18164 kept that check. createField() returns null when the field is
neither indexed nor stored, and List.of(null) throws, so StrField now uses the
same check. I don't have a better idea for now.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]