ChrisHegarty opened a new pull request, #14275: URL: https://github.com/apache/lucene/pull/14275
This commit adds support load per-iteration replacement of NamedSPI. The primary motivation for this change is to support deterministic SPI loading when deploying Lucene as a module. When deploying as on the class path the service loading follows the order of the jars on the classpath. When deploying as modules, services in modules are found before those in unnamed modules, but the order of services within a module layer is undefined. The API change proposed, `NamesSPI::replace`, allows subsequent service providers found to optionally replace ones found during the same iteration. This is sufficient when deploying just a couple of service provider implementation, or to effectively replace one provided by Lucene itself, e.g. https://github.com/elastic/elasticsearch/pull/123011 In fact, we think that this may be a sufficient model to provide customisation to certain codecs, just like in `#123011` (where we changed CompletionPostingFormats to use off-heap FST load mode ). -- 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