Class AbstractAnalysisFactory

java.lang.Object
org.apache.lucene.analysis.AbstractAnalysisFactory
Direct Known Subclasses:
CharFilterFactory, TokenFilterFactory, TokenizerFactory

public abstract class AbstractAnalysisFactory extends Object
Abstract parent class for analysis factories TokenizerFactory, TokenFilterFactory and CharFilterFactory.

The typical lifecycle for a factory consumer is:

  1. Create factory via its constructor (or via XXXFactory.forName)
  2. (Optional) If the factory uses resources such as files, ResourceLoaderAware.inform(ResourceLoader) is called to initialize those resources.
  3. Consumer calls create() to obtain instances.
  • Field Details

    • LUCENE_MATCH_VERSION_PARAM

      public static final String LUCENE_MATCH_VERSION_PARAM
      See Also:
    • originalArgs

      private final Map<String,String> originalArgs
      The original args, before any processing
    • luceneMatchVersion

      protected final Version luceneMatchVersion
      the luceneVersion arg
    • isExplicitLuceneMatchVersion

      private boolean isExplicitLuceneMatchVersion
      whether the luceneMatchVersion arg is explicitly specified in the serialized schema
    • ITEM_PATTERN

      private static final Pattern ITEM_PATTERN
    • CLASS_NAME

      private static final String CLASS_NAME
      See Also:
    • SPI_NAME

      private static final String SPI_NAME
      See Also:
  • Constructor Details

    • AbstractAnalysisFactory

      protected AbstractAnalysisFactory()
      This default ctor is required to be implemented by all subclasses because of service loader (SPI) specification, but it is never called by Lucene.

      Subclass ctors should call: throw defaultCtorException();

      Throws:
      UnsupportedOperationException - if invoked
      See Also:
    • AbstractAnalysisFactory

      protected AbstractAnalysisFactory(Map<String,String> args)
      Initialize this factory via a set of key-value pairs.
  • Method Details