[
https://issues.apache.org/jira/browse/SOLR-5755?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13911803#comment-13911803
]
Shalin Shekhar Mangar commented on SOLR-5755:
---------------------------------------------
Here's what I have so far:
Migrating documents to their own collection:
/admin/collections?action=MIGRATE&collection=name&split.key=key1!&target.collection=target_collection&forward.timeout=60
The MIGRATE command is used to migrate all documents having the given routing
key to another collection. The source collection will continue to have the same
data as-is but it will start re-routing write requests to the target collection
for the number of seconds specified by the forward.timeout parameter. It is the
responsibility of the user to switch to the target collection for reads and
writes after the ‘migrate’ command completes.
The routing key specified by the ‘split.key’ parameter may span multiple shards
on both the source and the target collections. The migration is performed
shard-by-shard in a single thread. One or more temporary collections may be
created by this command during the ‘migrate’ process but they are cleaned up at
the end automatically.
This is a synchronous operation and therefore keeping a large read timeout on
the invocation is advised. The request may still timeout due to inherent
limitations of the Collection APIs but that doesn’t necessarily mean that the
operation has failed. Users should check logs, cluster state, source and target
collections before invoking the operation again.
This command works only with collections having the compositeId router. The
target collection must not be receiving any writes during the time the migrate
command is running otherwise they some writes may be lost.
Please note that the migrate API does not perform any deduplication on the
documents so if the target collection contains documents with the same
uniqueKey as the documents being migrated then the target collection will end
up with duplicate documents.
List of parameters and defaults
> Document the new 'migrate' collection API
> -----------------------------------------
>
> Key: SOLR-5755
> URL: https://issues.apache.org/jira/browse/SOLR-5755
> Project: Solr
> Issue Type: Task
> Components: documentation, SolrCloud
> Reporter: Shalin Shekhar Mangar
> Assignee: Shalin Shekhar Mangar
> Fix For: 4.7
>
>
> Document the new 'migrate' collection API in the Solr reference guide.
--
This message was sent by Atlassian JIRA
(v6.1.5#6160)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]