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/09/01 13:46:13 UTC

[GitHub] [lucene] jpountz commented on issue #11393: Ghost fields and postings/points [LUCENE-10357]

jpountz commented on issue #11393:
URL: https://github.com/apache/lucene/issues/11393#issuecomment-1234304794

   > I see that getValues also throws exception in case FieldInfo#getPointDimensionCount is 0, which means that callers can't blindly call getValues without consulting FieldInfo first
   
   It's a bit more complicated than that. Callers indeed cannot call `PointsReader#getValues` blindly, which is a codec API that should only be called on fields that have points enabled. However, callers can call `LeafReader#getPointValues` blindly, the user-facing API, which internally checks whether the field is indexed with points to know whether it should forward to the `PointsReader#getValues` codec API or return `null`. Queries are expected to always interact with points through `LeafReader#getPointValues`, not `PointsReader#getValues`. If we changed `PointsReader#getValues` to never return `null`, `LeafReader#getPointValues` would still return `null` on fields that do not exist or that do not have points enabled.


-- 
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