Class LanguagePrefixedTextAnalyzer
java.lang.Object
org.apache.lucene.analysis.Analyzer
org.alfresco.solr.schema.highlight.LanguagePrefixedTextAnalyzer
- All Implemented Interfaces:
Closeable,AutoCloseable
public class LanguagePrefixedTextAnalyzer
extends org.apache.lucene.analysis.Analyzer
A custom
Analyzer type, aware about the Solr IndexSchema, which delegates the processing to a custom
TokenStream.
Although the core part of the logic needed for that dynamic assignment is in LanguagePrefixedTokenStream
the actors group is also composed by:
- a
TextFieldsubclass (this class) - a custom
Analyzer - a custom token stream
LanguagePrefixedTokenStream
IndexSchema instance (e.g. a Tokenizer is a schema concept,
while IndexSchema belongs to Solr classes).- Author:
- Andrea Gazzarini
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.analysis.Analyzer
org.apache.lucene.analysis.Analyzer.ReuseStrategy, org.apache.lucene.analysis.Analyzer.TokenStreamComponents -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected org.apache.solr.schema.IndexSchemaFields inherited from class org.apache.lucene.analysis.Analyzer
GLOBAL_REUSE_STRATEGY, PER_FIELD_REUSE_STRATEGY -
Constructor Summary
ConstructorsConstructorDescriptionLanguagePrefixedTextAnalyzer(org.apache.solr.schema.IndexSchema indexSchema, AlfrescoAnalyzerWrapper.Mode mode) -
Method Summary
Modifier and TypeMethodDescriptionorg.apache.lucene.analysis.Analyzer.TokenStreamComponentscreateComponents(String fieldName) Methods inherited from class org.apache.lucene.analysis.Analyzer
attributeFactory, close, getOffsetGap, getPositionIncrementGap, getReuseStrategy, getVersion, initReader, initReaderForNormalization, normalize, normalize, setVersion, tokenStream, tokenStream
-
Field Details
-
indexSchema
protected org.apache.solr.schema.IndexSchema indexSchema -
mode
-
-
Constructor Details
-
LanguagePrefixedTextAnalyzer
public LanguagePrefixedTextAnalyzer(org.apache.solr.schema.IndexSchema indexSchema, AlfrescoAnalyzerWrapper.Mode mode)
-
-
Method Details
-
createComponents
- Specified by:
createComponentsin classorg.apache.lucene.analysis.Analyzer
-