benwtrent commented on PR #13641:
URL: https://github.com/apache/lucene/pull/13641#issuecomment-2344221805
@bugmakerrrrrr I don't want to make that change as the
PerFieldDocValuesFormat & PerFieldPostingsFormat field readers will return
`null` if the field is missing. I want to at least try to unify the
`PerFieldKnnVectorsFormat` with those
However, we are fairly inconsistent all over the place here. For example, in
our Postings formats, we will check for `null` and return null, but for doc
value formats, those look like they will throw NPEs.
Doc value exmaple:
```
@Override
public NumericDocValues getNumeric(FieldInfo field) throws IOException {
NumericEntry entry = numerics.get(field.number);
return getNumeric(entry);
}
```
Postings:
```
@Override
public Terms terms(String field) throws IOException {
assert field != null;
FieldInfo fieldInfo = fieldInfos.fieldInfo(field);
return fieldInfo == null ? null : fieldMap.get(fieldInfo.number);
}
```
--
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]