You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Shalin Shekhar Mangar (JIRA)" <ji...@apache.org> on 2014/05/28 18:31:05 UTC

[jira] [Updated] (SOLR-6021) Always persist router.field in cluster state so CloudSolrServer can route documents correctly

     [ https://issues.apache.org/jira/browse/SOLR-6021?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Shalin Shekhar Mangar updated SOLR-6021:
----------------------------------------

    Attachment: SOLR-6021.patch

Changes
# Added a getter for coreConfigService in CoreContainer
# Overseer reads config/schema to get the unique key field name if router is not implicit and router.field is not specified.
# Added a test in TestCollection API

I initially wanted to do this in OverseerCollectionProcessor but then you can skip that completely if you're creating collections through the core admin API.

SolrJ doesn't need any changes because if a router.field is configured, the "idField" and it's value is not used at all.

> Always persist router.field in cluster state so CloudSolrServer can route documents correctly
> ---------------------------------------------------------------------------------------------
>
>                 Key: SOLR-6021
>                 URL: https://issues.apache.org/jira/browse/SOLR-6021
>             Project: Solr
>          Issue Type: Improvement
>          Components: SolrCloud
>            Reporter: Shalin Shekhar Mangar
>         Attachments: SOLR-6021.patch
>
>
> CloudSolrServer has idField as "id" which is used for hashing and distributing documents. There is a setter to change it as well.
> IMO, we should use the correct uniqueKey automatically. I propose that we start storing router.field always in cluster state and set it to the uniqueKey field name by default. Then CloudSolrServer would not need to assume an "id" field by default.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org