You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@lucene.apache.org by jm <jm...@gmail.com> on 2010/02/25 12:06:31 UTC

AnalyzerUtils.getLoggingAnalyzer changing the way the inner analyzer works?

I have an issue with my custom analyzer...see the following code:

    public static Analyzer getAnalyzer() {
        // cache the analyzer
        if (analyzer == null) {
            analyzer = new CustomStopAnalyzer(); //does some basic
customization, nothing too fancy
            //test
            //analyzer = AnalyzerUtils.getLoggingAnalyzer(new
CustomStopAnalyzer(), System.out, "debug");
        }
        return analyzer;
    }

The thing is, the content in the index is different if I index with
one analyzer or the other. AnalyzerUtils.getLoggingAnalyzer() is from
contrib, lucene 3.0. I assume by the doc that
AnalyzerUtils.getLoggingAnalyzer does not change the workings of the
inner analyzer, but by using luke I can see this is happening! At
least it looks like.
I index a word like: mail44. With new CustomStopAnalyzer() I get
'mail' indexed, and with AnalyzerUtils.getLoggingAnalyzer I get
'mail44' (that is what should be indexed).

Anyone has a clue??
thanks
javi

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