hibernate/hibernate-search — pull request #397 by emmanuelbernard (2013-04-12 17:00:26+00:00)
Title: HSEARCH-472

I think the feature is in good shape now minus the documentation.
There are a few opened questions / tasks before it is finalized but I need feedback

1. Should we refine the setting options (see below)
1. Should `public String getShardIdentifier(Class entity, Serializable id, String idInString, Document document);` return `String[]` instead and why? -> it looks like it should be a different issue though.
1. Should we add `EntityIndexBinder#getShardIdentifierProvider()` so that a user can influence the list of shards? I suspect yet as we do expose `ShardingIndexStrategy`.
1. Should we deprecate `ShardingIndexStrategy`? I would leave it on until we make dynamic sharding non experimental. It also has WFK consequences.
1. I'm a bit unhappy about the fact that to delete, you must use all shards most of the time. Not sure there is a good solution.
1. Write the documentation.

## Options

Today we have to set

hibernate.search.Animal.sharding_strategy.nbr_of_shards = dynamic
hibernate.search.Animal.sharding_strategy.shard_identity_provider = some.AnimalShardProvider

Alternatively we could do

hibernate.search.Animal.sharding_strategy = dynamic
hibernate.search.Animal.sharding_strategy.shard_identity_provider = some.AnimalShardProvider
//ignore nbr_of_shards if set