iverase opened a new issue, #16518: URL: https://github.com/apache/lucene/issues/16518
I was reviewing the implementation of that method and I noticed that in most cases we need to perform IO to compute the value. In some cases, we need to catch the IOException and throw and UncheckedIOException instead (see [TermQuery](https://github.com/apache/lucene/blob/fa0e704d2a0f941f2bbca17184472ae0e2b3743e/lucene/core/src/java/org/apache/lucene/search/TermQuery.java#L180)) or in some cases the IO has already been performed somewhere else (see [DefaultScorerSupplier](https://github.com/apache/lucene/blob/378ca8d1bbf36a9b57c1c8cd6ac1703f005c4cfe/lucene/core/src/java/org/apache/lucene/search/Weight.java#L207) where the scorer has already being built). Therefore throwing an IOException in this method provides better information to the user and it makes the code a bit cleaner. The idea would be changing this method signature for lucene 11. -- 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]
