Adrien Grand created LUCENE-10357: ------------------------------------- Summary: Ghost fields and postings/points Key: LUCENE-10357 URL: https://issues.apache.org/jira/browse/LUCENE-10357 Project: Lucene - Core Issue Type: Task Reporter: Adrien Grand
On doc values and norms, we require that codec APIs return non-null empty instances on fields that have the feature turned on on their FieldInfo, even if all values have been merged away. However postings and points have the choice: they may either return empty instances or {{null}}. See e.g. {{BasePostingsFormatTestCase#testGhosts}} for instance. I fear that this could be a source of bugs, as a caller could be tempted to assume that he would get non-null terms on a FieldInfo that has IndexOptions that are not NONE. Should we introduce a contract that FieldsProducer (resp. PointsReader) must return a non-null instance when postings (resp. points) are indexed? -- This message was sent by Atlassian Jira (v8.20.1#820001) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org For additional commands, e-mail: issues-h...@lucene.apache.org