Referencing the discussion here
I think it might be useful to allow you to trigger a custom analyzer in a class- or fieldbridge. This would allow you to select appropriate analyzers for any custom field within a bridge. This would probably usually be a classbridge.
I can see a few ways to do this:
1. Add a setAnalyzer method to the luceneOptions element. This would prevent interface changes.
2. Implement a new interface AnalyzerBridge that offers a setAnalyzer method.
3. Implement a new interface AnalyzerSelectBridge that allows you to select a predefined analyzer.
Even if one selects a discriminator at the classbridge level it would have to be applicable at a field level. I just realized that by using the luceneOptions.addFieldToDocument could be used for this by adding an overriden method
luceneOptions.addFieldToDocument(String fieldName, String indexedString, Document document, String analyzerDefinition)
Was solved in Hibernate Search 6 some time ago. You can define every field very precisely in a TypeBridge, including the analyzer.