My application uses multiple datasources (all with the same structure) for different clients. In Hibernate Search 5 I used custom abstract implementation of ShardIdentifierProviderTemplate with override shared identifier for each client, then set “hibernate.search.default.sharding_strategy” with client implementation for each entity manager. In elastic search it index each indicate with my client suffix like: entity-client1, entity-client2.
In Hibernate Search 6 I tried to do something similar using implementation of IndexLayoutStrategy for each client and set “hibernate.search.default.sharding_strategy” in entity manager, but when it doesn’t work properly I found that IndexLayoutStrategy works per backend.
So finally I would like to dynamically (depends on entity manager) use customized index suffix.
Is such case possible in Hibernate Search 6?