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