public class StemmingAnalyzer
extends org.apache.lucene.analysis.Analyzer
TextAnalyzer
that takes in a set of stop words and a stem filter as a function to apply to the text being
analyzed.Constructor and Description |
---|
StemmingAnalyzer(org.apache.lucene.util.Version matchVersion,
boolean indexing,
com.google.common.base.Function<org.apache.lucene.analysis.TokenStream,org.apache.lucene.analysis.TokenStream> stemmingFilter,
com.google.common.base.Function<org.apache.lucene.analysis.TokenStream,org.apache.lucene.analysis.TokenStream> stopWordFilter) |
Modifier and Type | Method and Description |
---|---|
boolean |
isIndexing() |
org.apache.lucene.analysis.TokenStream |
reusableTokenStream(String fieldName,
Reader reader) |
org.apache.lucene.analysis.TokenStream |
tokenStream(String fieldname,
Reader reader) |
protected org.apache.lucene.analysis.TokenStream |
wrapStreamForIndexing(org.apache.lucene.analysis.TokenStream input)
Applies a
SubtokenFilter to the input token stream at document indexing time. |
protected org.apache.lucene.analysis.TokenStream |
wrapStreamForWilcardSearchSupport(org.apache.lucene.analysis.TokenStream input)
Applies a
KeywordRepeatFilter to the input token stream at document indexing time to store the original
tokens as keywords before any stemming filter is applied and therefore support wildcard searches and exact phrase
queries on document fields. |
public StemmingAnalyzer(org.apache.lucene.util.Version matchVersion, boolean indexing, com.google.common.base.Function<org.apache.lucene.analysis.TokenStream,org.apache.lucene.analysis.TokenStream> stemmingFilter, com.google.common.base.Function<org.apache.lucene.analysis.TokenStream,org.apache.lucene.analysis.TokenStream> stopWordFilter)
public final org.apache.lucene.analysis.TokenStream tokenStream(String fieldname, Reader reader)
tokenStream
in class org.apache.lucene.analysis.Analyzer
public boolean isIndexing()
protected org.apache.lucene.analysis.TokenStream wrapStreamForIndexing(org.apache.lucene.analysis.TokenStream input)
SubtokenFilter
to the input token stream at document indexing time.input
- token streamprotected org.apache.lucene.analysis.TokenStream wrapStreamForWilcardSearchSupport(org.apache.lucene.analysis.TokenStream input)
KeywordRepeatFilter
to the input token stream at document indexing time to store the original
tokens as keywords before any stemming filter is applied and therefore support wildcard searches and exact phrase
queries on document fields.input
- token streampublic final org.apache.lucene.analysis.TokenStream reusableTokenStream(String fieldName, Reader reader) throws IOException
reusableTokenStream
in class org.apache.lucene.analysis.Analyzer
IOException
Copyright © 2002-2015 Atlassian. All Rights Reserved.