public final class CJKAnalyzer extends StopwordAnalyzerBase
Analyzer that tokenizes text with StandardTokenizer,
normalizes content with CJKWidthFilter, folds case with
LowerCaseFilter, forms bigrams of CJK with CJKBigramFilter,
and filters stopwords with StopFilterReusableAnalyzerBase.TokenStreamComponents| Modifier and Type | Field and Description |
|---|---|
static String[] |
STOP_WORDS
Deprecated.
use
getDefaultStopSet() instead |
matchVersion, stopwords| Constructor and Description |
|---|
CJKAnalyzer(Version matchVersion)
Builds an analyzer which removes words in
getDefaultStopSet(). |
CJKAnalyzer(Version matchVersion,
Set<?> stopwords)
Builds an analyzer with the given stop words
|
CJKAnalyzer(Version matchVersion,
String... stopWords)
Deprecated.
use
CJKAnalyzer(Version, Set) instead |
| Modifier and Type | Method and Description |
|---|---|
protected ReusableAnalyzerBase.TokenStreamComponents |
createComponents(String fieldName,
Reader reader)
Creates a new
ReusableAnalyzerBase.TokenStreamComponents instance for this analyzer. |
static Set<?> |
getDefaultStopSet()
Returns an unmodifiable instance of the default stop-words set.
|
getStopwordSet, loadStopwordSet, loadStopwordSet, loadStopwordSetinitReader, reusableTokenStream, tokenStreamclose, getOffsetGap, getPositionIncrementGap, getPreviousTokenStream, setPreviousTokenStream@Deprecated public static final String[] STOP_WORDS
getDefaultStopSet() insteadpublic CJKAnalyzer(Version matchVersion)
getDefaultStopSet().public CJKAnalyzer(Version matchVersion, Set<?> stopwords)
matchVersion - lucene compatibility versionstopwords - a stopword set@Deprecated public CJKAnalyzer(Version matchVersion, String... stopWords)
CJKAnalyzer(Version, Set) insteadstopWords - stop word arraypublic static Set<?> getDefaultStopSet()
protected ReusableAnalyzerBase.TokenStreamComponents createComponents(String fieldName, Reader reader)
ReusableAnalyzerBaseReusableAnalyzerBase.TokenStreamComponents instance for this analyzer.createComponents in class ReusableAnalyzerBasefieldName - the name of the fields content passed to the
ReusableAnalyzerBase.TokenStreamComponents sink as a readerreader - the reader passed to the Tokenizer constructorReusableAnalyzerBase.TokenStreamComponents for this analyzer.