You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@lucene.apache.org by GitBox <gi...@apache.org> on 2022/01/05 10:01:17 UTC

[GitHub] [lucene] jpountz commented on a change in pull request #583: LUCENE-10354: Clarify contract of codec APIs with missing/disabled fields.

jpountz commented on a change in pull request #583:
URL: https://github.com/apache/lucene/pull/583#discussion_r778690428



##########
File path: lucene/core/src/java/org/apache/lucene/codecs/FieldsProducer.java
##########
@@ -42,6 +45,14 @@ protected FieldsProducer() {}
    */
   public abstract void checkIntegrity() throws IOException;
 
+  /**
+   * Get the {@link Terms} for this field. The behavior is undefined if the field doesn't have

Review comment:
       This is the part of the change I was not comfortable with. I wanted to do the change on codec APIs while still giving the ability for users to pass any fields in user-facing APIs, unfortunately Fields is a user-facing API so I didn't want to change it so I thought of imposing a stricter contract on `FieldsProducer`. I reverted this part of the change for now as I'd like to think more about it.
   
   There is another issue with this change: postings and points currently return null for ghost fields. I'll open a separate issue to ask if we want to make this more consistent with doc values or vectors which return empty instances for ghost fields (ie. fields that have the feature enabled on their FieldInfos but no values). So I reverted the comment that says that the return value is not null on points and postings.




-- 
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: issues-unsubscribe@lucene.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org