Package org.apache.lucene.analysis.cjk
Class CJKAnalyzer
- java.lang.Object
-
- org.apache.lucene.analysis.Analyzer
-
- org.apache.lucene.analysis.ReusableAnalyzerBase
-
- org.apache.lucene.analysis.StopwordAnalyzerBase
-
- org.apache.lucene.analysis.cjk.CJKAnalyzer
-
- All Implemented Interfaces:
Closeable
,AutoCloseable
public final class CJKAnalyzer extends org.apache.lucene.analysis.StopwordAnalyzerBase
AnAnalyzer
that tokenizes text withStandardTokenizer
, normalizes content withCJKWidthFilter
, folds case withLowerCaseFilter
, forms bigrams of CJK withCJKBigramFilter
, and filters stopwords withStopFilter
-
-
Field Summary
Fields Modifier and Type Field Description static String[]
STOP_WORDS
Deprecated.usegetDefaultStopSet()
instead
-
Constructor Summary
Constructors Constructor Description CJKAnalyzer(org.apache.lucene.util.Version matchVersion)
Builds an analyzer which removes words ingetDefaultStopSet()
.CJKAnalyzer(org.apache.lucene.util.Version matchVersion, String... stopWords)
Deprecated.useCJKAnalyzer(Version, Set)
insteadCJKAnalyzer(org.apache.lucene.util.Version matchVersion, Set<?> stopwords)
Builds an analyzer with the given stop words
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected org.apache.lucene.analysis.ReusableAnalyzerBase.TokenStreamComponents
createComponents(String fieldName, Reader reader)
static Set<?>
getDefaultStopSet()
Returns an unmodifiable instance of the default stop-words set.-
Methods inherited from class org.apache.lucene.analysis.StopwordAnalyzerBase
getStopwordSet, loadStopwordSet, loadStopwordSet, loadStopwordSet
-
Methods inherited from class org.apache.lucene.analysis.ReusableAnalyzerBase
initReader, reusableTokenStream, tokenStream
-
-
-
-
Field Detail
-
STOP_WORDS
@Deprecated public static final String[] STOP_WORDS
Deprecated.usegetDefaultStopSet()
insteadAn array containing some common English words that are not usually useful for searching and some double-byte interpunctions.
-
-
Constructor Detail
-
CJKAnalyzer
public CJKAnalyzer(org.apache.lucene.util.Version matchVersion)
Builds an analyzer which removes words ingetDefaultStopSet()
.
-
CJKAnalyzer
public CJKAnalyzer(org.apache.lucene.util.Version matchVersion, Set<?> stopwords)
Builds an analyzer with the given stop words- Parameters:
matchVersion
- lucene compatibility versionstopwords
- a stopword set
-
CJKAnalyzer
@Deprecated public CJKAnalyzer(org.apache.lucene.util.Version matchVersion, String... stopWords)
Deprecated.useCJKAnalyzer(Version, Set)
insteadBuilds an analyzer which removes words in the provided array.- Parameters:
stopWords
- stop word array
-
-
Method Detail
-
getDefaultStopSet
public static Set<?> getDefaultStopSet()
Returns an unmodifiable instance of the default stop-words set.- Returns:
- an unmodifiable instance of the default stop-words set.
-
-