Quote:
The ThreadLocal variable can't be used to get the discriminant value, isn't it ?
Not at indexing time, but if you can understand the right shard from some information in the Document you're set. The Document is built by the same thread as user transaction, so at that moment you could add some extra information.
Quote:
I also need to add dynamically new indexing Directory when a new customer is registered. From what I see in the documentation, sharding definition is static (in property file). Is there a way to add a shard dynamically, or does it need to reload the SessionFactory ?
That's planned for future, currently you'll need to reload the SessionFactory.
Quote:
What is the second technique you mention ("Simple Filter") ? Can you give me a pointer to use this ?
Just look into "filters" on the reference.