Class LanguagePrefixedTextAnalyzer

  • All Implemented Interfaces:
    java.io.Closeable, java.lang.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:
    LanguagePrefixedTokenStream, LanguagePrefixedTextField
    • 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 indexSchema  
      AlfrescoAnalyzerWrapper.Mode mode  
      • Fields inherited from class org.apache.lucene.analysis.Analyzer

        GLOBAL_REUSE_STRATEGY, PER_FIELD_REUSE_STRATEGY
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      org.apache.lucene.analysis.Analyzer.TokenStreamComponents createComponents​(java.lang.String fieldName)  
      • 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
    • Constructor Detail

      • LanguagePrefixedTextAnalyzer

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

      • createComponents

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