lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Hostetter <>
Subject Re: StandardAnalyzer .. stemming
Date Fri, 17 Feb 2006 19:47:04 GMT

: The SnowBallAnalyzer seems to offer stemming. The StandardAnalyzer on
: the other hand has a bunch of other niceness. What is the best practice
: of leveraging both these analyzers while indexing and searching? Do I
: chain these up somehow and if so what apis do i look at for doing so? Do
: i implement my own analyzer and use both these two process the tokens?

the Analyzer class is already designed to making chaining very easy -- but
not Analyzer chaining, TokenFilter chaining.

if you take a look at the source for StandardAnalyzer and SnowBallAnalyzer
it should (hopefully) be very obvious how to write your own (10 line or
less) Analyzer that gives youall the goodness you want from both...

...if you literaly just want to add snowball stemming to
the end of StandardAnalyzer, then i *think* something like this would

   Analyzer a = new StandardAnalyzer(stoplist) {
     public TokenStream tokenStream(String fieldName, Reader reader) {
       return new SnowballFilter(super.tokenStream(fieldName,reader),


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message