Class CustomAnalyzer

java.lang.Object
org.apache.lucene.analysis.Analyzer
org.elasticsearch.index.analysis.CustomAnalyzer
All Implemented Interfaces:
Closeable, AutoCloseable, AnalyzerComponentsProvider

public final class CustomAnalyzer extends org.apache.lucene.analysis.Analyzer implements AnalyzerComponentsProvider
  • Constructor Details

  • Method Details

    • tokenizerFactory

      public TokenizerFactory tokenizerFactory()
    • tokenFilters

      public TokenFilterFactory[] tokenFilters()
    • charFilters

      public CharFilterFactory[] charFilters()
    • getPositionIncrementGap

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

      public int getOffsetGap(String 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(String fieldName)
      Specified by:
      createComponents in class org.apache.lucene.analysis.Analyzer
    • initReader

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

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

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