org.hibernate.search.cfg

## Class EntityMapping

- java.lang.Object
- - org.hibernate.search.cfg.EntityMapping

-     public class EntityMapping
      extends Object

  Author:
    Emmanuel Bernard

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `EntityMapping(Class<?> entityType, SearchMapping mapping)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods Deprecated Methods
    Modifier and Type | Method and Description
    --- | ---
    `AnalyzerDefMapping` | `analyzerDef(String name, Class<? extends TokenizerFactory> tokenizerFactory)`
    `AnalyzerDefMapping` | `analyzerDef(String name, String tokenizerName, Class<? extends TokenizerFactory> tokenizerFactory)`
    `EntityMapping` | `analyzerDiscriminator(Class<? extends Discriminator> discriminator)`
    `EntityMapping` | `boost(float boost)`
    `ClassBridgeMapping` | `classBridge(Class<?> impl)`
    `ClassBridgeMapping` | `classBridgeInstance(FieldBridge classBridge)` Registers the given class bridge for the currently configured entity type.
    `EntityMapping` | `dynamicBoost(Class<? extends BoostStrategy> impl)` Deprecated. Index-time boosting will not be possible anymore starting from Lucene 7. You should use query-time boosting instead, for instance by calling `boostedTo(float)` when building queries with the Hibernate Search query DSL.
    `EntityMapping` | `entity(Class<?> entityType)`
    `FullTextFilterDefMapping` | `fullTextFilterDef(String name, Class<?> impl)`
    `IndexedMapping` | `indexed()`
    `NormalizerDefMapping` | `normalizerDef(String name)`
    `PropertyMapping` | `property(String name, ElementType type)`
    `EntitySpatialMapping` | `spatial()`

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

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

- - ### Constructor Detail

    - #### EntityMapping

          public EntityMapping(Class<?> entityType,
                               SearchMapping mapping)

  - ### Method Detail

    - #### indexed

          public IndexedMapping indexed()

    - #### spatial

          public EntitySpatialMapping spatial()

    - #### boost

          public EntityMapping boost(float boost)

    - #### dynamicBoost

          @Deprecated
          public EntityMapping dynamicBoost(Class<? extends BoostStrategy> impl)

      Deprecated. Index-time boosting will not be possible anymore starting from Lucene 7. You should use query-time boosting instead, for instance by calling `boostedTo(float)` when building queries with the Hibernate Search query DSL.
      Parameters:
        `impl` - The class for an implementation of `BoostStrategy`.
      Returns:
        this mapping, for chained calls.

    - #### analyzerDiscriminator

          public EntityMapping analyzerDiscriminator(Class<? extends Discriminator> discriminator)

    - #### fullTextFilterDef

          public FullTextFilterDefMapping fullTextFilterDef(String name,
                                                            Class<?> impl)

    - #### property

          public PropertyMapping property(String name,
                                          ElementType type)

    - #### analyzerDef

          public AnalyzerDefMapping analyzerDef(String name,
                                                Class<? extends TokenizerFactory> tokenizerFactory)

    - #### analyzerDef

          public AnalyzerDefMapping analyzerDef(String name,
                                                String tokenizerName,
                                                Class<? extends TokenizerFactory> tokenizerFactory)

    - #### normalizerDef

          public NormalizerDefMapping normalizerDef(String name)

    - #### entity

          public EntityMapping entity(Class<?> entityType)

    - #### classBridge

          public ClassBridgeMapping classBridge(Class<?> impl)

    - #### classBridgeInstance

          public ClassBridgeMapping classBridgeInstance(FieldBridge classBridge)

      Registers the given class bridge for the currently configured entity type. Any subsequent analyzer, parameter etc. configurations apply to this class bridge.
      Parameters:
        `classBridge` - a class bridge instance
      Returns:
        a new `ClassBridgeMapping` following the method chaining pattern
      Throws:
        `SearchException` - in case the same bridge instance is passed more than once for the currently configured entity type
      Experimental
        This method is considered experimental and it may be altered or removed in future releases

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