[ 
https://issues.apache.org/jira/browse/SOLR-5017?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13704223#comment-13704223
 ] 

Noble Paul commented on SOLR-5017:
----------------------------------

bq.I think it should work simpler... shard is used as the whole value to hash 
on for any hash based router.

Should the field based sharding be any less powerful than compositeId? Or do we 
want to have configure multiple fields like 
shardField=primaryShardFIeld,secondaryShardField instead of separating the 
values with a '/'


bq.Perhaps that should be a different router... compositeField rather than 
compositeId.

Too many routers can be confusing to users. Essentially it is a hash router. 
The only difference is where the value is obtained for hashing. It could be 
from an 'id' ( which is the default) or it can be from a separate field. We 
probably should rename the CompositeIdRouter to HashRouter instead of having 
multiple routers doing slightly different things. In reality , it is not a 
CompositeFieldRouter, it is just a FieldHashRouter

bq.For the implicit router. For a hash based router, it should be the value 
that is hashed to then lookup the shard based on ranges.

I understand that. I'm worried about the name. Should we rather not use the 
other parameter \'shard.keys across router names , query and update requests . 
It is very confusing to have these names behaving differently in different 
routers. 

I'm all for changing the param from \_shard_ to \'shard.keys' and keeping it 
consistent between all routers



                
> Allow sharding based on the value of a field
> --------------------------------------------
>
>                 Key: SOLR-5017
>                 URL: https://issues.apache.org/jira/browse/SOLR-5017
>             Project: Solr
>          Issue Type: Sub-task
>            Reporter: Noble Paul
>            Assignee: Noble Paul
>
> We should be able to create a collection where sharding is done based on the 
> value of a given field
> collections can be created with shardField=fieldName, which will be persisted 
> in DocCollection in ZK
> implicit DocRouter would look at this field instead of _shard_ field
> CompositeIdDocRouter can also use this field instead of looking at the id 
> field. 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to