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: Both of them have no specific logic: they exist only because the components involved in the analysis chain don't have access to the 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

    Fields
    Modifier and Type
    Field
    Description
    protected org.apache.solr.schema.IndexSchema
     
     

    Fields inherited from class org.apache.lucene.analysis.Analyzer

    GLOBAL_REUSE_STRATEGY, PER_FIELD_REUSE_STRATEGY
  • Constructor Summary

    Constructors
    Constructor
    Description
    LanguagePrefixedTextAnalyzer(org.apache.solr.schema.IndexSchema indexSchema, AlfrescoAnalyzerWrapper.Mode mode)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    org.apache.lucene.analysis.Analyzer.TokenStreamComponents
     

    Methods inherited from class org.apache.lucene.analysis.Analyzer

    attributeFactory, close, getOffsetGap, getPositionIncrementGap, getReuseStrategy, getVersion, initReader, initReaderForNormalization, normalize, normalize, setVersion, tokenStream, tokenStream

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

  • Constructor Details

    • LanguagePrefixedTextAnalyzer

      public LanguagePrefixedTextAnalyzer(org.apache.solr.schema.IndexSchema indexSchema, AlfrescoAnalyzerWrapper.Mode mode)
  • Method Details

    • createComponents

      public org.apache.lucene.analysis.Analyzer.TokenStreamComponents createComponents(String fieldName)
      Specified by:
      createComponents in class org.apache.lucene.analysis.Analyzer