The Solr documentation for creating your own token and character filters says the following.
http://wiki.apache.org/solr/AnalyzersTokenizersTokenFilters#Specifying_an_Analyzer_in_the_schema
If you want to use custom CharFilters, Tokenizers or TokenFilters, you'll need to write a very simple factory that subclasses BaseTokenizerFactory or BaseTokenFilterFactory, something like this...
public class MyCustomFilterFactory extends BaseTokenFilterFactory {
public TokenStream create(TokenStream input) {
return new MyCustomFilter(input);
}
}
I cannot find the BaseTokenFilterFactory anywhere in the source code for Solr 4.
Here is the org.apache.solr.analysis package from Solr 3.6.1
And here is the same package for Solr 4.0.0
The documentation looks like it will work for Solr 3.6, but I need to know how to create custom filters using 4.0.