Hello,
For background, I’m using solr version 7.3.1 and lucene version 7.3.1
I have a solr collection with 2 shards and 3 replicas using the compositeId
router. Each solr document has “id” as its unique key, where each id is of
format DERP_${X}, where ${X} is some 24 character alphanumerical string. I
create this collection in the following way:
curl
"http://localhost:8983/solr/admin/collections?action=CREATE&name=derp&collection.configName=derp&numShards=2&replicationFactor=3&maxShardsPerNode=0&autoAddReplicas=true"
Suppose I have some other collection named herp, created in the same fashion,
and a collection named blurp, with 1 shard, but otherwise created in the same
fashion. Also suppose that there are 2000 documents in the derp collection,
but none in the herp or blurp collections.
I’ve been attempting to do two things with the MIGRATE Collections API:
1. Migrate all documents from the derp collection to the herp collection
using the following command:
curl
"http://localhost:8983/solr/admin/collections?action=MIGRATE&collection=derp&target.collection=herp&split.key=DERP/0\!&async=30"
| jq
2. Migrate all documents from the derp collection to the blurp collection
using the same MIGRATE command, swapping herp for blurp.
(I chose split.key=DERP/0! With the intent of capturing all documents in my
source collection, since the /0 should tell the migrate command to only look at
the hash of the id field, since I’m not using a shard key).
In both cases, the response of the corresponding REQUESTSTATUS indicates
success. For example:
╰─$ curl
"localhost:8985/solr/admin/collections?action=REQUESTSTATUS&requestid=30"
{
"responseHeader":{
"status":0,
"QTime":2},
"success":{
"100.109.8.33:8983_solr":{
"responseHeader":{
"status":0,
"QTime":10}},
"100.109.8.33:8983_solr":{
"responseHeader":{
"status":0,
"QTime":0}},
"100.109.8.33:8983_solr":{
"responseHeader":{
"status":0,
"QTime":0}},
"100.109.8.33:8983_solr":{
"responseHeader":{
"status":0,
"QTime":0}},
"100.109.8.33:8983_solr":{
"responseHeader":{
"status":0,
"QTime":0}},
"100.109.8.33:8983_solr":{
"responseHeader":{
"status":0,
"QTime":0}},
"100.109.8.33:8983_solr":{
"responseHeader":{
"status":0,
"QTime":94}},
"100.109.8.33:8983_solr":{
"responseHeader":{
"status":0,
"QTime":0}},
"100.109.8.33:8983_solr":{
"responseHeader":{
"status":0,
"QTime":82}},
"100.109.8.33:8983_solr":{
"responseHeader":{
"status":0,
"QTime":85}}},
"3023875288733778":{
"responseHeader":{
"status":0,
"QTime":0},
"STATUS":"completed",
"Response":"TaskId: 3023875288733778 webapp=null path=/admin/cores
params={async=3023875288733778&qt=/admin/cores&name=herp_shard2_replica_n8&action=REQUESTBUFFERUPDATES&wt=javabin&version=2}
status=0 QTime=10"},
"302387540601230023875636935846":{
"responseHeader":{
"status":0,
"QTime":0},
"STATUS":"completed",
"Response":"TaskId: 302387540601230023875636935846 webapp=null
path=/admin/cores
params={qt=/admin/cores&collection.configName=derp&newCollection=true&collection=split_shard2_temp_shard2&version=2&replicaType=NRT&async=302387540601230023875636935846&coreNodeName=core_node2&name=split_shard2_temp_shard2_shard1_replica_n1&action=CREATE&numShards=1&shard=shard1&wt=javabin}
status=0 QTime=0"},
"3023878903291448":{
"responseHeader":{
"status":0,
"QTime":0},
"STATUS":"completed",
"Response":"TaskId: 3023878903291448 webapp=null path=/admin/cores
params={core=derp_shard2_replica_n8&async=3023878903291448&split.key=Z!&qt=/admin/cores&ranges=3dba0000-3dbaffff&action=SPLIT&targetCore=split_shard2_temp_shard2_shard1_replica_n1&wt=javabin&version=2}
status=0 QTime=0"},
"3023880308944216":{
"responseHeader":{
"status":0,
"QTime":0},
"STATUS":"completed",
"Response":"TaskId: 3023880308944216 webapp=null path=/admin/cores
params={async=3023880308944216&qt=/admin/cores&coreNodeName=core_node4&collection.configName=derp&name=split_shard2_temp_shard2_shard1_replica_n3&action=CREATE&collection=split_shard2_temp_shard2&shard=shard1&wt=javabin&version=2&replicaType=NRT}
status=0 QTime=0"},
"3023882401961074":{
"responseHeader":{
"status":0,
"QTime":0},
"STATUS":"completed",
"Response":"TaskId: 3023882401961074 webapp=null path=/admin/cores
params={nodeName=100.109.8.33:8983_solr&core=split_shard2_temp_shard2_shard1_replica_n1&async=3023882401961074&qt=/admin/cores&coreNodeName=core_node4&action=PREPRECOVERY&checkLive=true&state=active&onlyIfLeader=true&wt=javabin&version=2}
status=0 QTime=0"},
"3023885405877119":{
"responseHeader":{
"status":0,
"QTime":0},
"STATUS":"completed",
"Response":"TaskId: 3023885405877119 webapp=null path=/admin/cores
params={core=herp_shard2_replica_n8&async=3023885405877119&qt=/admin/cores&action=MERGEINDEXES&srcCore=split_shard2_temp_shard2_shard1_replica_n3&wt=javabin&version=2}
status=0 QTime=94"},
"3023885501282272":{
"responseHeader":{
"status":0,
"QTime":0},
"STATUS":"completed",
"Response":"TaskId: 3023885501282272 webapp=null path=/admin/cores
params={async=3023885501282272&qt=/admin/cores&name=herp_shard2_replica_n8&action=REQUESTAPPLYUPDATES&wt=javabin&version=2}
status=0 QTime=0"},
"status":{
"state":"completed",
"msg":"found [30] in completed tasks"}}
However, after running this command and seeing success, there are still no
documents the target collections. Any ideas where I might be going wrong?
Thanks in advance!
Matthew
The content of this email is intended solely for the individual or entity named
above and access by anyone else is unauthorized. If you are not the intended
recipient, any disclosure, copying, distribution, or use of the contents of
this information is prohibited and may be unlawful. If you have received this
electronic transmission in error, please reply immediately to the sender that
you have received the message in error, and delete it. Thank you.