Currently the Analyzers are being looked up by name, but the name map is built by Hibernate Search itself according to its configuration and @AnalyzerDef annotations.
Other frameworks, Infinispan Query as a concrete case, might want to provide additional means for defining analyzers. We decided at a face to face meeting that the simplest solution would be to make our "Analyzer Map" a Service contract, so that they can inject their own instance to override the current one, which would be promoted to "default implementation".
The interface definition looks like trivial; we need to make sure however that we consistently use this and keep in mind that the Map is a concurrent service, which might be updated by external parties at runtime.
I suspect - and hope - that we'll be able to agree that such updates can only be additive: i.e. adding a new name/analyzer couple would be fine, but changing or removing the mapping of a previously defined name is more problematic without introducing some locking mechanism.
I started looking into that ticket, but I'm not sure I understand the matter. The part about injection new analyzers at runtime in particular seems a bit strange, and may conflict with what we'll do in HSEARCH-2219...
Anyway, I'll work on instead and will either leave this ticket to you or come back to that later.
Making this a bloquer since it's needed for Infinispan Query
Note: this work should probably be done on top of my existing branch for