lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Erik Hatcher <e...@ehatchersolutions.com>
Subject Re: about Filttering
Date Thu, 23 Feb 2006 20:25:15 GMT

On Feb 23, 2006, at 1:22 PM, Daniel Cortes wrote:

> Hi luceners,
>
> I have a problem that I don't know what to do.
>
> I want to use ISOLatin1AccentFilter that I found In lucene trunks
>
> The code in my analyzer is:
>
>  public final TokenStream tokenStream(String fieldName, Reader  
> reader) {
>
>    if (fieldName == null) throw new IllegalArgumentException 
> ("fieldName must not be null");
>    if (reader == null) throw new IllegalArgumentException("reader  
> must not be null");
>    TokenStream result = new StandardTokenizer(reader);
>
>    result = new ISOLatin1AccentFilter(result);
>    //result = new ParaulesFilter(new LowerCaseFilter(result));
>    result = new StandardFilter(result);
>    result = new StopFilter(new LetterTokenizer(reader), stoptable);
>      return result;
>  }
>
> Why reason It doesn't works? I try to put some sysouts in de code  
> Code of ISOLatin1AccentFilter, and the only log that appears is in  
> the constructor method, but
> never do next() method of ISOLatin1AccentFilter.
>
> I don't have idea to do. thks for any reply to rescue me :D.

Well, it's because you have a bug in your code.... the result that is  
returned is just a StopFilter.  You aren't chaining things properly  
to achieve what you want.

	Erik



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


Mime
View raw message