I found this: https://issues.apache.org/jira/browse/SOLR-2592
And tried adding the following to my solrconfig.xml <shardKeyParserFactory class="org.apache.solr.common.cloud.CompositeIdShardKeyParser"> <str name="clause">groupid</str> <bool name="clauseRequired">false</bool> </shardKeyParserFactory> However I am still getting all documents added to the shard that I run the DIH on. According to this comment on the tracker the default sharding should be on uniqueId anyway 1. Configure a ShardKeyParserFactory in SolrConfig under config/shardKeyParserFactory. If there is not one configured the default implementation of sharding on the document's unique id will be performed. The default configuration is equivalent to: {code:xml} <shardKeyParserFactory class="solr.ShardKeyParserFactory"/> {code} So is this a problem with the DIH not respecting sharding? This was not a problem for me in 4.0 with the same configuration. -- View this message in context: http://lucene.472066.n3.nabble.com/Solr-4-1-Custom-Hashing-DIH-tp4036316p4036321.html Sent from the Solr - User mailing list archive at Nabble.com.