org.hibernate.search.elasticsearch.analyzer.impl

## Class LuceneClassElasticsearchAnalyzerReference

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

- All Implemented Interfaces:
    Closeable, AutoCloseable, AnalyzerReference

      public class LuceneClassElasticsearchAnalyzerReference
      extends ElasticsearchAnalyzerReference

  A reference to an analyzer that should be translated from a Lucene class.
  Author:
    Yoann Rodiere

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `LuceneClassElasticsearchAnalyzerReference(Class<?> luceneClass)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `String` | `getAnalyzerName(String fieldName)`
    `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 `ElasticsearchAnalyzerReference.registerDefinitions(String, ElasticsearchAnalysisDefinitionRegistry)`.
    `boolean` | `isInitialized()`
    `boolean` | `isNormalizer(String fieldName)`
    `void` | `registerDefinitions(String fieldName, ElasticsearchAnalysisDefinitionRegistry definitionRegistry)` Register definitions that will be needed in order to add the field named `fieldName` to the Elasticsearch mapping.
    `String` | `toString()`

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

      `close`

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

      `is, unwrap`

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

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

- - ### Constructor Detail

    - #### LuceneClassElasticsearchAnalyzerReference

          public LuceneClassElasticsearchAnalyzerReference(Class<?> luceneClass)

  - ### Method Detail

    - #### getAnalyzerName

          public String getAnalyzerName(String fieldName)

      Specified by:
        `getAnalyzerName` in class `RemoteAnalyzerReference`

    - #### isNormalizer

          public boolean isNormalizer(String fieldName)

      Parameters:
        `fieldName` - name of the field whose analyzer is to be inspected
      Returns:
        `true` if the analyzer for the field with the given name is a normalizer, `false` otherwise.

    - #### registerDefinitions

          public void registerDefinitions(String fieldName,
                                          ElasticsearchAnalysisDefinitionRegistry definitionRegistry)

      Description copied from class: `ElasticsearchAnalyzerReference`
      Register definitions that will be needed in order to add the field named `fieldName` to the Elasticsearch mapping.
      Specified by:
        `registerDefinitions` in class `ElasticsearchAnalyzerReference`
      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 boolean isInitialized()

      Specified by:
        `isInitialized` in class `ElasticsearchAnalyzerReference`

    - #### initialize

          public void initialize(ElasticsearchAnalysisDefinitionRegistry definitionRegistry,
                                 ElasticsearchAnalyzerDefinitionTranslator translator)

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

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

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