Thanks a lot, Robert.

I need to study a bit more closely the link you have sent. I have tried to
override the Analyzer class, but couldn't find a method createComponents(String
fieldName,Reader reader) in LUCENE_34. Instead, there is a method required
to override: tokenStream(String fieldName, Reader reader). Is there a way
of incorporating the custom filter into the TokenStream?


Dmitry

On Thu, Feb 14, 2013 at 5:37 PM, Robert Muir <rcm...@gmail.com> wrote:

> MockAnalyzer is really just MocKTokenizer+MockTokenFilter+....
>
> Instead you just define your own analyzer chain using MockTokenizer.
> This is the way all lucene's own analysis tests work: e.g.
>
> http://svn.apache.org/repos/asf/lucene/dev/trunk/lucene/analysis/common/src/test/org/apache/lucene/analysis/en/TestEnglishMinimalStemFilter.java
>
> On Thu, Feb 14, 2013 at 7:40 AM, Dmitry Kan <solrexp...@gmail.com> wrote:
> > Hello,
> >
> > Asked a question on SO:
> >
> >
> http://stackoverflow.com/questions/14873207/mockanalyzer-in-lucene-attach-stemmer-or-any-custom-filter
> >
> > Is there a way to configure a stemmer or a custom filter with the
> > MockAnalyzer class?
> > Version: LUCENE_34
> >
> > Dmitry
>

Reply via email to