Update Lucene analyzers in CQ5.5
Hello
I'm implementing a search feature in CQ5.5. A requirement for search is that 'stemming' be used - search for 'builder' and find 'building', 'builds' etc.
This functionality can be had using, for example, org.apache.lucene.analysis.en.EnglishAnalyzer. However, the Lucene that comes with CQ5.5 is v303. Its available analyzers are:
$ find . -name "lucene-core*.jar" | xargs jar tf | grep "analysis/.*Analyzer"
org/apache/lucene/analysis/Analyzer.class
org/apache/lucene/analysis/KeywordAnalyzer.class
org/apache/lucene/analysis/PerFieldAnalyzerWrapper.class
org/apache/lucene/analysis/SimpleAnalyzer.class
org/apache/lucene/analysis/StopAnalyzer$1.class
org/apache/lucene/analysis/StopAnalyzer$SavedStreams.class
org/apache/lucene/analysis/StopAnalyzer.class
org/apache/lucene/analysis/WhitespaceAnalyzer.class
org/apache/lucene/analysis/standard/StandardAnalyzer$1.class
org/apache/lucene/analysis/standard/StandardAnalyzer$SavedStreams.class
org/apache/lucene/analysis/standard/StandardAnalyzer.class
Non of these support stemming. The earliest version where EnglishAnalyzer is available is 3.2. Is there a way to update the Lucene on an existing installation?
Alternatively, in next versions of Lucene, the analyzers live in a jar of their own - analyzers-common (http://lucene.apache.org/core/4_0_0/analyzers-common/overview-summary.html)
How would I expose these analyzers to the org.apache.jackrabbit.core.query.lucene.SearchIndex, the class that reads the SearchIndex tag in workspace.xml?
Thanks,
Eli