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

Yonik Seeley edited comment on SOLR-5017 at 7/10/13 1:17 PM:
-------------------------------------------------------------

bq. What if I to have a clean 'id' value which is devoid of extra information? 
Should I do id.substring(id.indexOf("!") everytime I use it elsewhere ?

Why would you have to do that?  If "!" appears in the ID field by accident 
sometimes, everything still works as expected with the compositeId router - 
that's why it's the default.

edit: Oh, I think I see what you mean... you want to use the id unchanged as a 
foreign key. You could always store that as a separate field too.  Anyway, I'm 
not arguing against using another field, but I do think it's the less common 
and more complex solution (given that you now need to provide that extra value 
everywhere).
                
      was (Author: [email protected]):
    bq. What if I to have a clean 'id' value which is devoid of extra 
information? Should I do id.substring(id.indexOf("!") everytime I use it 
elsewhere ?

Why would you have to do that?  If "!" appears in the ID field by accident 
sometimes, everything still works as expected with the compositeId router - 
that's why it's the default.
                  
> 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