[
https://issues.apache.org/jira/browse/SOLR-7242?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15943447#comment-15943447
]
Erick Erickson commented on SOLR-7242:
--------------------------------------
Setting the <uniqueKey> seems dangerous to me. There's a very small window
where that's won't mess things up when using composite id routing, specifically
between the time you put the configset up in SolrCloud and the time you index
your first document for any collection that uses that configset. Any time after
that and Bad Things Happen.
I suppose if the collection was defined with implicit routing at least that
case would be OK as far as routing docs.
Could you even update an existing document after changing? Your <uniqueKey>
might not even exist in a document before this change. Especially bad would be
if you just "didn't like the name" and switched from "id" to "mypersonalid"
after indexing docs.
The more I think about this, the more negative I am on this specific bit of
functionality. I suppose if it were really desirable for, say, some GUI that
_defined_ schemas it could be an "expert", undocumented feature, I just don't
want to deal with all the ways it could be abused.
I suppose one could build in really draconian safeguards and refuse to carry
out the operation if the schema in question was used by any collection in
SolrCloud mode. Personally I wouldn't care if there were any docs in those
collections or not. While technically you _could_ change the <uniqueKey> if
there weren't any docs in the collection, that's too subtle to let "into the
wild" given the benefits are minimal. I mean how hard is it to nuke/create a
collection with 0 docs in it? Not sure if you can safeguard much in stand-alone
though.
I just don't want to chase down "All of the sudden I'm getting duplicate
documents and I didn't change anything". 6 hours later "Oh, yeah, I did change
the unique key after indexing 500M documents" ;).
> Schema API: Edit remaining schema elements: Name, Version, Unique Key, and
> Global Similarity
> --------------------------------------------------------------------------------------------
>
> Key: SOLR-7242
> URL: https://issues.apache.org/jira/browse/SOLR-7242
> Project: Solr
> Issue Type: Sub-task
> Components: Schema and Analysis
> Reporter: Steve Rowe
> Assignee: Steve Rowe
>
> We should be able to specify an entire schema via the bulk schema API.
> The bulk schema API should have the following commands in addition to those
> already available/planned:
> # {{set-name}}
> # {{set-version}}
> # {{set-unique-key}}/{{unset-unique-key}}
> # {{set-similarity}}
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]