I like the patch, we can apply a slightly modified version of it.
* In private DirectoryProvider[] getDirectoryProviders(DocumentBuilderIndexedEntity builder)
if ( directoryProviders != null && directoryProviders.length > 0 ) return directoryProviders;
What's the reasoning for returning all shards if this method returns 0 providers. It seems to me that in this situation you want to avoid executing the query altogether.
* In the testcase, CustomerShardingStrategy does cast FullTextFilter into FullTextFilterImpl
That sucks.
We need to introduce a FullTextFilterImplementor interface with getName() ( and maybe Map<String, Object> getParameters() - we can add this one later);
We would then get
public DirectoryProvider<?>[] getDirectoryProvidersForQuery(FullTextFilterImplementor[] filters) {
* not sure why the CustomerShardingStrategy does not return all shards for getDirectoryProvidersForDeletion
* in CustomerShardingStrategy.getFilter
equalsIgnoreCase is wrong. Filter names are case sensitive.
* as I said in my reply to Sanne, I would like to get a way to declare a filter to be shard sensitive only. Either by providing a special class or by providing a flag, not sure.
@FullTextFilterDef(name="customer", impl=ShardSensitiveOnly.class)
Because I think we raise an exception if an unknown filter is requested.
In this case, the ShardSensitiveOnly impl can be ignored by the filter chaining we do otherwise.
Emmanuel