title: How to use multiple filter on Lucene Analyzer (Lucene 4.4)
body: <p>I'm trying to apply more than one filter on the TokenStream in my customized analyzer. Following is the code:</p>
  
  <pre class="lang-java prettyprint-override"><code>public class CustomizeAnalyzer extends Analyzer {
  //code omitted
  
  @Override
  protected TokenStreamComponents createComponents(String fieldName, Reader reader) {
      Tokenizer source = new LetterTokenizer(Version.LUCENE_44, reader);              
      TokenStream filter = new LowerCaseFilter(Version.LUCENE_44, source);                
      filter = new StopFilter(Version.LUCENE_44, filter, stopWords);                  
      return new TokenStreamComponents(source, new PorterStemFilter(source));
  }                                              
  }
  </code></pre>
  
  <p>However, the LowerCaseFilter won't be used. I literally follow the documentation <a href="http://lucene.apache.org/core/4_4_0/core/org/apache/lucene/analysis/Analyzer.html" rel="nofollow">here</a>.
  Can someone please explain me how to make it work?</p>
  
  <p>Many thanks,</p>