org.hibernate.search.elasticsearch.analyzer.impl

## Class ElasticsearchAnalyzerReference

- java.lang.Object
- - org.hibernate.search.analyzer.impl.RemoteAnalyzerReference
  - - org.hibernate.search.elasticsearch.analyzer.impl.ElasticsearchAnalyzerReference

- All Implemented Interfaces:
    Closeable, AutoCloseable, AnalyzerReference
  Direct Known Subclasses:
    LuceneClassElasticsearchAnalyzerReference, NamedElasticsearchAnalyzerReference, ScopedElasticsearchAnalyzerReference

      public abstract class ElasticsearchAnalyzerReference
      extends RemoteAnalyzerReference

  A reference to an `ElasticsearchAnalyzer`.
  Author:
    Yoann Rodiere

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `ElasticsearchAnalyzerReference()`

  - ### Method Summary

    All Methods Instance Methods Abstract Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `close()` Close analyzer if possible
    `abstract void` | `initialize(ElasticsearchAnalysisDefinitionRegistry definitionRegistry, ElasticsearchAnalyzerDefinitionTranslator translator)` Initialize the internals of this reference, so that enough information will be available to execute `RemoteAnalyzerReference.getAnalyzerName(String)` and `registerDefinitions(String, ElasticsearchAnalysisDefinitionRegistry)`.
    `abstract boolean` | `isInitialized()`
    `abstract void` | `registerDefinitions(String fieldName, ElasticsearchAnalysisDefinitionRegistry definitionRegistry)` Register definitions that will be needed in order to add the field named `fieldName` to the Elasticsearch mapping.

    - ### Methods inherited from class org.hibernate.search.analyzer.impl.RemoteAnalyzerReference

      `getAnalyzerName, is, unwrap`

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

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

    - ### Methods inherited from interface org.hibernate.search.analyzer.spi.AnalyzerReference

      `isNormalizer`

- - ### Constructor Detail

    - #### ElasticsearchAnalyzerReference

          public ElasticsearchAnalyzerReference()

  - ### Method Detail

    - #### registerDefinitions

          public abstract void registerDefinitions(String fieldName,
                                                   ElasticsearchAnalysisDefinitionRegistry definitionRegistry)

      Register definitions that will be needed in order to add the field named `fieldName` to the Elasticsearch mapping.
      Parameters:
        `fieldName` - The name of the field for which every referenced analysis definition should be registered.
        `definitionRegistry` - The registry to be populated (it may be empty).

    - #### isInitialized

          public abstract boolean isInitialized()

    - #### initialize

          public abstract void initialize(ElasticsearchAnalysisDefinitionRegistry definitionRegistry,
                                          ElasticsearchAnalyzerDefinitionTranslator translator)

      Initialize the internals of this reference, so that enough information will be available to execute `RemoteAnalyzerReference.getAnalyzerName(String)` and `registerDefinitions(String, ElasticsearchAnalysisDefinitionRegistry)`.
      Parameters:
        `definitionRegistry` - The registry holding all known analyzer definitions.
        `translator` - An `ElasticsearchAnalyzerDefinitionTranslator`.

    - #### close

          public void close()

      Description copied from interface: `AnalyzerReference`
      Close analyzer if possible

Copyright © 2006-2017 Red Hat, Inc. All Rights Reserved