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-unsubscr...@lucene.apache.org

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


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

Reply via email to