Emmanuel,
Regarding HSEARCH-251, and
http://www.opensubscriber.com/message/hibernate-dev@lists.jboss.org/9770383.htmlBeing able to query just a single shard or subset of shards would be awesome. I was thinking of a similar API:
IndexShardingStrategy:
public DirectoryProvider<?>[]
getDirectoryProviderForShard(int shardNum);
FullTextQuery:
public void enableShardFilter(int shardNum);
public void enableShardFilters(int[] shardNums);
FullTextQuery.buildSearcher() would need to be modified to call getDirectoryProviderForShard() for each shardNum if shardNums are set, otherwise it should continue to use getDirectoryProvidersForAllShards();
Calling this API from a consumer's stand-point would look like:
FullTextQuery fullTextQuery = fullTextSession.createFullTextQuery(luceneQuery, entityClass);
fullTextQuery.enableShardFilter(5);
fullTextQuery.list();
This could be changed to pass named shards easily. I could prototype this and submit a .patch if you are interested.
-Chase
--
This message was sent on behalf of
chase.seibert+opensubscriber@gmail.com at openSubscriber.com
http://www.opensubscriber.com/message/hibernate-dev@lists.jboss.org/9800518.html