As highlighted in this SO question: http://stackoverflow.com/questions/40928584/use-existing-analyzer-in-hibernate-search-analyzerdiscriminator
Not being able to associated an existing Analyzer class, for example org.apache.lucene.analysis.cjk.CJKAnalyzer to a "definition name", preculeds it from being used in some contexts, for example via @AnalyzerDiscriminator.
We have several alternative solutions.
- allow @AnalyzerDef to refer to an Analyzer class (how to handle the either/or of the various attributes? looks bad).
- allow the discriminator to return the class instance (horrible, and doesn't resolve the problem for possible other needs of named analyzers)
- allow defining name/class pairs in the configuration properties?
I think I prefer the 3rd option, but I also have the feeling that @AnalyzerDef isn't "complete" without this capability as it's not symmetric with the dual-capability of @Analyzer.