Also... be aware that you can use analyzer providers in Lucene as well. Maybe you should consider implementing both LuceneAnalyzerProvider and ElasticsearchAnalyzerProvider in the same class?