I can dynamically select an @AnalyzerDef using an AnalyzerDiscriminator as described here: https://docs.jboss.org/hibernate/search/4.1/reference/en-US/html/search-mapping.html#d0e3825
But I do not need an AnalyzerDef. I just want to dynamically select between GermanAnalyzer (for german content) and StandardAnalyzer (for english content).
How I can I do this? Is there something similiar to dynamically select between those pre-defined analyzers?
Here is a very simplified version of my entity:
Quote:
@Indexed(index = "myindex")
@Entity
public class Book {
@Id
private id;
// This property can be used to get the current language of the entity.
@Column
private String languageCode;
// This property has to be analyzed languaged dependent.
@Column
@Field(analyze = Analyze.YES, store = Store.NO, index = Index.YES)
@Boost(2.0f)
private String text;
// ...
}
Thanks in advance for any help
Thomas