Package org.apache.lucene.analysis.ja
Class JapaneseCompletionAnalyzer
java.lang.Object
org.apache.lucene.analysis.Analyzer
org.apache.lucene.analysis.ja.JapaneseCompletionAnalyzer
- All Implemented Interfaces:
Closeable,AutoCloseable
Analyzer for Japanese completion suggester.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.analysis.Analyzer
Analyzer.ReuseStrategy, Analyzer.TokenStreamComponents -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final JapaneseCompletionFilter.Modeprivate final UserDictionaryFields inherited from class org.apache.lucene.analysis.Analyzer
GLOBAL_REUSE_STRATEGY, PER_FIELD_REUSE_STRATEGY -
Constructor Summary
ConstructorsConstructorDescriptionCreates a newJapaneseCompletionAnalyzerwith default configurationsJapaneseCompletionAnalyzer(UserDictionary userDict, JapaneseCompletionFilter.Mode mode) Creates a newJapaneseCompletionAnalyzer -
Method Summary
Modifier and TypeMethodDescriptionprotected Analyzer.TokenStreamComponentscreateComponents(String fieldName) Creates a newAnalyzer.TokenStreamComponentsinstance for this analyzer.protected ReaderinitReader(String fieldName, Reader reader) Override this if you want to add a CharFilter chain.protected ReaderinitReaderForNormalization(String fieldName, Reader reader) Wrap the givenReaderwithCharFilters that make sense for normalization.Methods inherited from class org.apache.lucene.analysis.Analyzer
attributeFactory, close, getOffsetGap, getPositionIncrementGap, getReuseStrategy, normalize, normalize, tokenStream, tokenStream
-
Field Details
-
mode
-
userDict
-
-
Constructor Details
-
JapaneseCompletionAnalyzer
public JapaneseCompletionAnalyzer()Creates a newJapaneseCompletionAnalyzerwith default configurations -
JapaneseCompletionAnalyzer
Creates a newJapaneseCompletionAnalyzer
-
-
Method Details
-
createComponents
Description copied from class:AnalyzerCreates a newAnalyzer.TokenStreamComponentsinstance for this analyzer.- Specified by:
createComponentsin classAnalyzer- Parameters:
fieldName- the name of the fields content passed to theAnalyzer.TokenStreamComponentssink as a reader- Returns:
- the
Analyzer.TokenStreamComponentsfor this analyzer.
-
initReader
Description copied from class:AnalyzerOverride this if you want to add a CharFilter chain.The default implementation returns
readerunchanged.- Overrides:
initReaderin classAnalyzer- Parameters:
fieldName- IndexableField name being indexedreader- original Reader- Returns:
- reader, optionally decorated with CharFilter(s)
-
initReaderForNormalization
Description copied from class:AnalyzerWrap the givenReaderwithCharFilters that make sense for normalization. This is typically a subset of theCharFilters that are applied inAnalyzer.initReader(String, Reader). This is used byAnalyzer.normalize(String, String).- Overrides:
initReaderForNormalizationin classAnalyzer
-