My custom Analyzer had the following (Lucene 4) impl of createComponents:
protected TokenStreamComponents createComponents ( final String fieldName,
final Reader reader )
{
Tokenizer source = new KeywordTokenizer( reader );
TokenStream filter = new LowerCaseFilter( source );
return new TokenStreamComponents( source, filter );
}
As of Lucene 5 the signature of createComponents was changed to:
TokenStreamComponents createComponents ( String fieldName )
How do I get the "current" reader in Lucene 5?