vigyasharma opened a new pull request, #14486:
URL: https://github.com/apache/lucene/pull/14486

   Going by #13976 and this [dated stack overflow 
thread](https://stackoverflow.com/questions/49817453/searchermanager-and-multireader-in-lucene),
 it seems like there is desire for a reference managed MultiReader. 
   
   The implementation should provide a way to safely share a multi-reader 
across multiple threads, refresh underlying sub-readers periodically to pick 
new changes, and ensure that sub-readers are not closed until all threads have 
finished using them. I hacked together a quick prototype based on my 
understanding of the requirements. If this seems useful, I can add some tests 
and refine it. Or, @Shibi-bala, since you wrote the initial PR, feel free to 
take this further if you like.
   
   Following discussions from the PR, this manager exposes a Multi-Reader and 
expects users to create their own IndexSearcher on top of it. The managed 
multi-reader uses `DirectoryReader.openIfChanged` to refresh its sub-readers, 
and as such, requires its sub-readers to be `DirectoryReader` instances. I'm 
not sure if there are non DirectoryReader implementations that we want to 
handle via this manager. 
   
   This manager will increase / decrease refCount for each subReader on acquire 
and release. `acquire` will fail if refCount cannot be incremented for any of 
the subReaders, i.e. if any of the sub-readers have closed.
   


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