org.hibernate.search.store

## Interface IndexShardingStrategy

- All Known Implementing Classes:
    IdHashShardingStrategy

  Deprecated.
  Deprecated as of Hibernate Search 4.4. Might be removed in Search 5. Use `ShardIdentifierProvider` instead.

      @Deprecated
      public interface IndexShardingStrategy

  Defines how a given virtual index shards data into different IndexManager(s).
  Author:
    Emmanuel Bernard

- - ### Method Summary

    All Methods Instance Methods Abstract Methods Deprecated Methods
    Modifier and Type | Method and Description
    --- | ---
    `IndexManager` | `getIndexManagerForAddition(Class<?> entity, Serializable id, String idInString, Document document)` Deprecated.
    `IndexManager[]` | `getIndexManagersForAllShards()` Deprecated. Ask for all shards (eg to query or optimize)
    `IndexManager[]` | `getIndexManagersForDeletion(Class<?> entity, Serializable id, String idInString)` Deprecated. return the IndexManager(s) where the given entity is stored and where the deletion operation needs to be applied id and idInString could be null.
    `IndexManager[]` | `getIndexManagersForQuery(FullTextFilterImplementor[] fullTextFilters)` Deprecated. return the set of IndexManager(s) where the entities matching the filters are stored this optional optimization allows queries to hit a subset of all shards, which may be useful for some datasets if this optimization is not needed, return getIndexManagersForAllShards()
    `void` | `initialize(Properties properties, IndexManager[] indexManagers)` Deprecated. provides access to sharding properties (under the suffix sharding_strategy) and provide access to all the IndexManager for a given index

- - ### Method Detail

    - #### initialize

          void initialize(Properties properties,
                          IndexManager[] indexManagers)

      Deprecated.
      provides access to sharding properties (under the suffix sharding_strategy) and provide access to all the IndexManager for a given index
      Parameters:
        `properties` - configuration properties
        `indexManagers` - array of `IndexManager`

    - #### getIndexManagersForAllShards

          IndexManager[] getIndexManagersForAllShards()

      Deprecated.
      Ask for all shards (eg to query or optimize)
      Returns:
        all the `IndexManager` for all shards

    - #### getIndexManagerForAddition

          IndexManager getIndexManagerForAddition(Class<?> entity,
                                                  Serializable id,
                                                  String idInString,
                                                  Document document)

      Deprecated.
      Parameters:
        `entity` - the type of the entity
        `id` - the id in object form
        `idInString` - the id as transformed by the used TwoWayStringBridge
        `document` - the document to index
      Returns:
        the IndexManager where the given entity will be indexed

    - #### getIndexManagersForDeletion

          IndexManager[] getIndexManagersForDeletion(Class<?> entity,
                                                     Serializable id,
                                                     String idInString)

      Deprecated.
      return the IndexManager(s) where the given entity is stored and where the deletion operation needs to be applied id and idInString could be null. If null, all the IndexManagers containing entity types should be returned
      Parameters:
        `entity` - the type of the deleted entity
        `id` - the id in object form
        `idInString` - the id as transformed by the used TwoWayStringBridge
      Returns:
        the `IndexManager`(s) where the given entity is stored

    - #### getIndexManagersForQuery

          IndexManager[] getIndexManagersForQuery(FullTextFilterImplementor[] fullTextFilters)

      Deprecated.
      return the set of IndexManager(s) where the entities matching the filters are stored this optional optimization allows queries to hit a subset of all shards, which may be useful for some datasets if this optimization is not needed, return getIndexManagersForAllShards()
      Parameters:
        `fullTextFilters` - can be empty if no filter is applied
      Returns:
        the set of `IndexManager`(s) where the entities matching the filters are stored

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