-Analyzers and ReuseStrategy in Solr 4
Dominique Bejean 2012-04-21, 22:40
I developed a custom analyzer. This analyzer needs to be polymorphous
according to the first 4 characters of the text to be analyzed. In order
to do this I implement my own ReuseStratgy class (NoReuseStrategy) and
in the constructor, I do this super(new NoReuseStrategy());
At Lucene level, it works fine, the analyzer always rebuild the
With Solr, it doesn't work because Solr embed all analyzers in
AnalyzerWrapper and AnalyzerWrapper overwrites my NoReuseStrategy class
with the PerFieldReuseStrategy class.
Is there any way in order to define a custom ReuseStrategy class and use
it in Solr ?