lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From boblan...@tiscali.be
Subject [PATCH] Highlighter and FrenchStemFilter problem
Date Mon, 31 Jan 2005 12:50:54 GMT
Hello,

we were having problems with the highlighter in combination with the French
analyzer. The highlighter returned garbage when we used it after a pass through
the French analyzer. I found out that it's due do a problem in the token
creation within the FrenchStemFilter next() method. I don't have an account
to register bugs so I'm posting it here:

  public final Token next()
...
      if ( !s.equals( token.termText() ) ) {
        return new Token( s,0, s.lenght(), token.type() );
      }
....
  }

This should be:
  public final Token next()
...
      if ( !s.equals( token.termText() ) ) {
        return new Token( s, token.startOffset(), token.endOffset(), token.type());
      }
....
  }

cheers

Bob






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


Mime
View raw message