org.hibernate.search.analyzer.impl

## Class LuceneEmbeddedAnalyzerStrategy

- java.lang.Object
- - org.hibernate.search.analyzer.impl.LuceneEmbeddedAnalyzerStrategy

- All Implemented Interfaces:
    AnalyzerStrategy

      public class LuceneEmbeddedAnalyzerStrategy
      extends Object
      implements AnalyzerStrategy

  Author:
    Yoann Rodiere

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `LuceneEmbeddedAnalyzerStrategy(ServiceManager serviceManager, SearchConfiguration cfg)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `ScopedLuceneAnalyzerReference.Builder` | `buildScopedAnalyzerReference(AnalyzerReference initialGlobalAnalyzerReference)` Creates a `ScopedAnalyzerReference` builder.
    `LuceneAnalyzerReference` | `createDefaultAnalyzerReference()`
    `LuceneAnalyzerReference` | `createLuceneClassAnalyzerReference(Class<?> analyzerClass)`
    `LuceneAnalyzerReference` | `createLuceneClassNormalizerReference(Class<?> analyzerClass)`
    `NamedLuceneAnalyzerReference` | `createNamedAnalyzerReference(String name)`
    `NamedLuceneAnalyzerReference` | `createNamedNormalizerReference(String name)`
    `LuceneAnalyzerReference` | `createPassThroughAnalyzerReference()`
    `Map<String,AnalyzerReference>` | `createProvidedAnalyzerReferences()`
    `Map<String,AnalyzerReference>` | `createProvidedNormalizerReferences()`
    `void` | `initializeReferences(Collection<AnalyzerReference> analyzerReferences, Map<String,AnalyzerDef> mappingAnalyzerDefinitions, Collection<AnalyzerReference> normalizerReferences, Map<String,NormalizerDef> mappingNormalizerDefinitions)` Initializes references created by this strategy, i.e.

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

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

- - ### Constructor Detail

    - #### LuceneEmbeddedAnalyzerStrategy

          public LuceneEmbeddedAnalyzerStrategy(ServiceManager serviceManager,
                                                SearchConfiguration cfg)

  - ### Method Detail

    - #### createDefaultAnalyzerReference

          public LuceneAnalyzerReference createDefaultAnalyzerReference()

      Specified by:
        `createDefaultAnalyzerReference` in interface `AnalyzerStrategy`
      Returns:
        a reference to the default analyzer, the one to be used when no specific configuration is set on a given field.

    - #### createPassThroughAnalyzerReference

          public LuceneAnalyzerReference createPassThroughAnalyzerReference()

      Specified by:
        `createPassThroughAnalyzerReference` in interface `AnalyzerStrategy`
      Returns:
        a reference to an analyzer that applies no operation whatsoever to the flux. This is useful for queries operating on non-tokenized fields.

    - #### createProvidedAnalyzerReferences

          public Map<String,AnalyzerReference> createProvidedAnalyzerReferences()

      Specified by:
        `createProvidedAnalyzerReferences` in interface `AnalyzerStrategy`
      Returns:
        a map of named references to provided analyzers, i.e. those that we know for sure will be available.

    - #### createLuceneClassAnalyzerReference

          public LuceneAnalyzerReference createLuceneClassAnalyzerReference(Class<?> analyzerClass)

      Specified by:
        `createLuceneClassAnalyzerReference` in interface `AnalyzerStrategy`
      Parameters:
        `analyzerClass` - The analyzer class the reference should reference.
      Returns:
        a reference to an instance of the given analyzer class that will be `initialized later`.

    - #### createNamedAnalyzerReference

          public NamedLuceneAnalyzerReference createNamedAnalyzerReference(String name)

      Specified by:
        `createNamedAnalyzerReference` in interface `AnalyzerStrategy`
      Parameters:
        `name` - The name of the analyzer to be referenced.
      Returns:
        a reference that will be `initialized later`.

    - #### createProvidedNormalizerReferences

          public Map<String,AnalyzerReference> createProvidedNormalizerReferences()

      Specified by:
        `createProvidedNormalizerReferences` in interface `AnalyzerStrategy`
      Returns:
        a map of named references to provided normalizers, i.e. those that we know for sure will be available.

    - #### createLuceneClassNormalizerReference

          public LuceneAnalyzerReference createLuceneClassNormalizerReference(Class<?> analyzerClass)

      Specified by:
        `createLuceneClassNormalizerReference` in interface `AnalyzerStrategy`
      Parameters:
        `analyzerClass` - The analyzer class the reference should reference.
      Returns:
        a reference to an instance of the given analyzer class that will be `initialized later`.

    - #### createNamedNormalizerReference

          public NamedLuceneAnalyzerReference createNamedNormalizerReference(String name)

      Specified by:
        `createNamedNormalizerReference` in interface `AnalyzerStrategy`
      Parameters:
        `name` - The name of the normalizer to be referenced.
      Returns:
        a reference that will be `initialized later`.

    - #### initializeReferences

          public void initializeReferences(Collection<AnalyzerReference> analyzerReferences,
                                           Map<String,AnalyzerDef> mappingAnalyzerDefinitions,
                                           Collection<AnalyzerReference> normalizerReferences,
                                           Map<String,NormalizerDef> mappingNormalizerDefinitions)

      Description copied from interface: `AnalyzerStrategy`
      Initializes references created by this strategy, i.e. make them point to the actual analyzer/normalizer definition.
      Specified by:
        `initializeReferences` in interface `AnalyzerStrategy`
      Parameters:
        `analyzerReferences` - The analyzer references to initialize, gathered through calls to methods of this strategy.
        `mappingAnalyzerDefinitions` - The analyzer definitions gathered through the Hibernate Search mappings.
        `normalizerReferences` - The normalizer references to initialize, gathered through calls to methods of this strategy.
        `mappingNormalizerDefinitions` - The normalizer definitions gathered through the Hibernate Search mappings.

    - #### buildScopedAnalyzerReference

          public ScopedLuceneAnalyzerReference.Builder buildScopedAnalyzerReference(AnalyzerReference initialGlobalAnalyzerReference)

      Description copied from interface: `AnalyzerStrategy`
      Creates a `ScopedAnalyzerReference` builder.
      Specified by:
        `buildScopedAnalyzerReference` in interface `AnalyzerStrategy`
      Parameters:
        `initialGlobalAnalyzerReference` - The global analyzer to set initially on the builder.
      Returns:
        A `ScopedAnalyzerReference` builder. The returned reference will be `initialized later`.

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