ChrisHegarty commented on code in PR #16647:
URL: https://github.com/apache/lucene/pull/16647#discussion_r3949454102


##########
lucene/core/src/java/org/apache/lucene/index/SlowCodecReaderWrapper.java:
##########
@@ -213,6 +213,14 @@ public Map<String, Long> getOffHeapByteSize(FieldInfo 
fieldInfo) {
         return vectorsReader.getOffHeapByteSize(fieldInfo);
       }
 
+      @Override
+      public int getVectorCount(FieldInfo fieldInfo) throws IOException {

Review Comment:
   Good catch. Added unwrapSegmentReader() that returns null when the leaf 
doesn't unwrap to a SegmentReader, and getVectorCount now falls back to 
super.getVectorCount(fieldInfo) in that case. The fast metadata path is still 
used when unwrap succeeds.
   
   I left getOffHeapByteSize as is for now, but will follow up separately.



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

Reply via email to