lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Owen Densmore <o...@backspaces.net>
Subject Right way to make analyzer
Date Thu, 03 Feb 2005 14:26:30 GMT
Is this the right way to make a porter analyzer using the standard 
tokenizer?  I'm not sure about the order of the filters.

Owen

     class MyAnalyzer extends Analyzer {
       public TokenStream tokenStream(String fieldName, Reader reader) {
         return new PorterStemFilter(
             new StopFilter(
                 new LowerCaseFilter(
                     new StandardFilter(
                         new StandardTokenizer(reader))),
                StopAnalyzer.ENGLISH_STOP_WORDS));
       }
     }



---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-user-help@jakarta.apache.org


Mime
View raw message