org.apache.lucene.luke.models.analysis

## Class AnalysisImpl

- java.lang.Object
- - org.apache.lucene.luke.models.analysis.AnalysisImpl

- All Implemented Interfaces:
    Analysis

      public final class AnalysisImpl
      extends Object
      implements Analysis

  Default implementation of `AnalysisImpl`

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `protected static class` | `AnalysisImpl.ListBasedTokenStream` TokenStream that iterates over a list of pre-existing Tokens see org.apache.solr.handler.AnalysisRequestHandlerBase#ListBasedTokenStream

    - ### Nested classes/interfaces inherited from interface org.apache.lucene.luke.models.analysis.Analysis

      `Analysis.CharfilteredText, Analysis.NamedObject, Analysis.NamedTokens, Analysis.StepByStepResult, Analysis.Token, Analysis.TokenAttribute`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `AnalysisImpl()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addExternalJars(List<String> jarFiles)` Adds external jar files to classpath and loads custom `CharFilterFactory`s, `TokenizerFactory`s, or `TokenFilterFactory`s.
    `List<Analysis.Token>` | `analyze(String text)` Analyzes given text with the current Analyzer.
    `Analysis.StepByStepResult` | `analyzeStepByStep(String text)` Analyzes given text with the current Analyzer.
    `Analyzer` | `buildCustomAnalyzer(CustomAnalyzerConfig config)` Creates new custom Analyzer instance with the given configurations.
    `Analyzer` | `createAnalyzerFromClassName(String analyzerType)` Creates new Analyzer instance for the specified class name.
    `Analyzer` | `currentAnalyzer()` Returns current analyzer.
    `Collection<String>` | `getAvailableCharFilters()` Returns available char filter names.
    `Collection<String>` | `getAvailableTokenFilters()` Returns available token filter names.
    `Collection<String>` | `getAvailableTokenizers()` Returns available tokenizer names.
    `Collection<Class<? extends Analyzer>>` | `getPresetAnalyzerTypes()` Returns built-in `Analyzer`s.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### AnalysisImpl

          public AnalysisImpl()

  - ### Method Detail

    - #### addExternalJars

          public void addExternalJars(List<String> jarFiles)

      Description copied from interface: `Analysis`
      Adds external jar files to classpath and loads custom `CharFilterFactory`s, `TokenizerFactory`s, or `TokenFilterFactory`s.
      Specified by:
        `addExternalJars` in interface `Analysis`
      Parameters:
        `jarFiles` - - list of paths to jar file

    - #### getPresetAnalyzerTypes

          public Collection<Class<? extends Analyzer>> getPresetAnalyzerTypes()

      Description copied from interface: `Analysis`
      Returns built-in `Analyzer`s.
      Specified by:
        `getPresetAnalyzerTypes` in interface `Analysis`

    - #### getAvailableCharFilters

          public Collection<String> getAvailableCharFilters()

      Description copied from interface: `Analysis`
      Returns available char filter names.
      Specified by:
        `getAvailableCharFilters` in interface `Analysis`

    - #### getAvailableTokenizers

          public Collection<String> getAvailableTokenizers()

      Description copied from interface: `Analysis`
      Returns available tokenizer names.
      Specified by:
        `getAvailableTokenizers` in interface `Analysis`

    - #### getAvailableTokenFilters

          public Collection<String> getAvailableTokenFilters()

      Description copied from interface: `Analysis`
      Returns available token filter names.
      Specified by:
        `getAvailableTokenFilters` in interface `Analysis`

    - #### analyze

          public List<Analysis.Token> analyze(String text)

      Description copied from interface: `Analysis`
      Analyzes given text with the current Analyzer.
      Specified by:
        `analyze` in interface `Analysis`
      Parameters:
        `text` - - text string to analyze
      Returns:
        the list of token

    - #### createAnalyzerFromClassName

          public Analyzer createAnalyzerFromClassName(String analyzerType)

      Description copied from interface: `Analysis`
      Creates new Analyzer instance for the specified class name.
      Specified by:
        `createAnalyzerFromClassName` in interface `Analysis`
      Parameters:
        `analyzerType` - - instantiable class name of an Analyzer
      Returns:
        new Analyzer instance

    - #### buildCustomAnalyzer

          public Analyzer buildCustomAnalyzer(CustomAnalyzerConfig config)

      Description copied from interface: `Analysis`
      Creates new custom Analyzer instance with the given configurations.
      Specified by:
        `buildCustomAnalyzer` in interface `Analysis`
      Parameters:
        `config` - - custom analyzer configurations
      Returns:
        new Analyzer instance

    - #### currentAnalyzer

          public Analyzer currentAnalyzer()

      Description copied from interface: `Analysis`
      Returns current analyzer.
      Specified by:
        `currentAnalyzer` in interface `Analysis`

    - #### analyzeStepByStep

          public Analysis.StepByStepResult analyzeStepByStep(String text)

      Description copied from interface: `Analysis`
      Analyzes given text with the current Analyzer.
      Specified by:
        `analyzeStepByStep` in interface `Analysis`
      Parameters:
        `text` - - text string to analyze
      Returns:
        the list of text by charfilter and the list of pair of Tokenizer/TokenFilter name and tokens

Copyright © 2000-2020 Apache Software Foundation. All Rights Reserved.