You could configure, or you can use a standard language analyzer, such as PortugueseAnalyzer
. I'd recommend starting from the existing analyzer, and creating you own if necessary, using it as a starting point for tweaking the filter chain.
You can set this in using the @Analyzer
annotation for the field:
@Field(index=Index.YES, analyze=Analyze.YES, store=Store.NO, analyzer = @Analyzer(impl = org.apache.lucene.analysis.pt.PortugueseAnalyzer.class))
Or you can set that analyzer as the default for the class, if you place an @analyzer
annotation are the head of the class instead.