Deepika0510 commented on PR #12345:
URL: https://github.com/apache/lucene/pull/12345#issuecomment-1790951857

   What I meant to ask is that after creating the `TimeoutLeafReader` class, 
how would we make sure that this wrapped class's object is used instead of any 
normal `LeafReader` instance?
   
   E.g. when we created wrapped `IndexReader` then we modified the 
`getIndexReader()` method such that if timeout is applied then we make sure 
that we return the wrapped `IndexReader` object.
   
   Similarly, we have to ensure the same for the `TimeoutLeafReader` as well 
right? That is where my doubt lies that since `LeafReader` is accessed through 
`indexReader.getContext().leaves().reader()` (like 
[here](https://github.com/apache/lucene/blob/2d50c345fea3d1a64090d6d0cffef6b70d482a9f/lucene/core/src/java/org/apache/lucene/search/IndexSearcher.java#L343))
 then shouldn’t we need to intercept in between this to return the object of 
`TimeoutLeafReader`?
   
   


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