Class CustomAnalyzer

org.apache.lucene.analysis.Analyzer
org.elasticsearch.index.analysis.CustomAnalyzer
All Implemented Interfaces:
, , AnalyzerComponentsProvider

public final class CustomAnalyzer extends org.apache.lucene.analysis.Analyzer implements AnalyzerComponentsProvider
  • 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 inherited from class org.apache.lucene.analysis.Analyzer

    GLOBAL_REUSE_STRATEGY, PER_FIELD_REUSE_STRATEGY
  • Constructor Summary

    Constructors
    Constructor
    Description
    CustomAnalyzer​(TokenizerFactory tokenizerFactory, CharFilterFactory[] charFilters, TokenFilterFactory[] tokenFilters)
     
    CustomAnalyzer​(TokenizerFactory tokenizerFactory, CharFilterFactory[] charFilters, TokenFilterFactory[] tokenFilters, int positionIncrementGap, int offsetGap)
     
  • Method Summary

    Modifier and Type
    Method
    Description
     
    protected org.apache.lucene.analysis.Analyzer.TokenStreamComponents
     fieldName)
     
     
     
    int
     field)
     
    int
     fieldName)
     
    protected
     fieldName,  reader)
     
    protected
     fieldName,  reader)
     
    protected org.apache.lucene.analysis.TokenStream
     fieldName, org.apache.lucene.analysis.TokenStream in)
     
     
     

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

    attributeFactory, close, getReuseStrategy, getVersion, normalize, setVersion, tokenStream, tokenStream

    Methods inherited from class java.lang.

    , , , , , , , , , ,
  • Constructor Details

  • Method Details

    • tokenizerFactory

      public TokenizerFactory tokenizerFactory()
    • tokenFilters

      public TokenFilterFactory[] tokenFilters()
    • charFilters

      public CharFilterFactory[] charFilters()
    • getPositionIncrementGap

      public int getPositionIncrementGap( fieldName)
      Overrides:
      getPositionIncrementGap in class org.apache.lucene.analysis.Analyzer
    • getOffsetGap

      public int getOffsetGap( field)
      Overrides:
      getOffsetGap in class org.apache.lucene.analysis.Analyzer
    • getAnalysisMode

      public AnalysisMode getAnalysisMode()
    • getComponents

      public AnalyzerComponents getComponents()
      Specified by:
      getComponents in interface AnalyzerComponentsProvider
    • createComponents

      protected org.apache.lucene.analysis.Analyzer.TokenStreamComponents createComponents( fieldName)
      Specified by:
      createComponents in class org.apache.lucene.analysis.Analyzer
    • initReader

      protected  initReader( fieldName,  reader)
      Overrides:
      initReader in class org.apache.lucene.analysis.Analyzer
    • initReaderForNormalization

      protected  initReaderForNormalization( fieldName,  reader)
      Overrides:
      initReaderForNormalization in class org.apache.lucene.analysis.Analyzer
    • normalize

      protected org.apache.lucene.analysis.TokenStream normalize( fieldName, org.apache.lucene.analysis.TokenStream in)
      Overrides:
      normalize in class org.apache.lucene.analysis.Analyzer