Specify a Custom Sharding Strategy
Responsible for splitting the data into sub-indexes is the IndexShardingStrategy. The default sharding strategy splits the data according to the hash value of the id string representation (generated by the FieldBridge). This ensures a fairly balanced sharding. You can replace the default strategy by implementing a custom IndexShardingStrategy. To use your custom strategy you have to set the hibernate.search. .sharding_strategy property. Example 3.4. Specifying a custom sharding strategy hibernate.search..sharding_strategy my.shardingstrategy.Implementation