I defined a filter this way
Code:
@Entity
@Table(name = "Entity")
@Indexed
@AnalyzerDef(name = "entityAnalyser",
tokenizer = @TokenizerDef(factory = StandardTokenizerFactory.class),
filters = { @TokenFilterDef(factory = StandardFilterFactory.class),
@TokenFilterDef(factory = LowerCaseFilterFactory.class),
@TokenFilterDef(factory = StopFilterFactory.class),
@TokenFilterDef(factory = SnowballPorterFilterFactory.class, params = { @Parameter(name = "language", value = "French")}),
@TokenFilterDef(factory = PhoneticFilterFactory.class ,params = { @Parameter(name="encoder", value="DoubleMetaphone")}),
@TokenFilterDef(factory = ASCIIFoldingFilterFactory.class),
@TokenFilterDef(factory = NGramFilterFactory.class, params = { @Parameter(name = "minGramSize", value = "3"),
@Parameter(name = "maxGramSize", value = "3") })
}
,charFilters = { @CharFilterDef(factory = HTMLStripCharFilterFactory.class) }
)
@Analyzer(definition="entityAnalyser")
public class Entity implements java.io.Serializable {
I would like to use the FrenchAnalyser.
Is there a way to enhance the FrenchAnalyser by annotations, or do I have to recreate the FrenchAnalyser with annotations like above, or extend the FrenchAnalyser class, to include java code that does what the above anotations are doing ??