You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by gu...@apache.org on 2020/06/05 21:48:12 UTC

[lucene-solr] branch master updated (ae3de57 -> ff8caeb)

This is an automated email from the ASF dual-hosted git repository.

gus pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/lucene-solr.git.


    from ae3de57  SOLR-14538: Fix or suppress remaining warnings in apache/solr/handler
     new 4b496b3  SOLR-13169 Improve docs for MOVEREPLICA - correct existing parameter docs.
     new ff8caeb  SOLR-13169 Improve docs for MOVEREPLICA - improve examples

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 solr/solr-ref-guide/src/replica-management.adoc    | 69 ++++++++++++++++++++--
 .../apispec/collections.collection.Commands.json   |  4 +-
 2 files changed, 67 insertions(+), 6 deletions(-)


[lucene-solr] 01/02: SOLR-13169 Improve docs for MOVEREPLICA - correct existing parameter docs.

Posted by gu...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

gus pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/lucene-solr.git

commit 4b496b364f23d7a838cbca35892aff1433ce5477
Author: Gus Heck <gu...@apache.org>
AuthorDate: Fri Jun 5 16:33:36 2020 -0400

    SOLR-13169 Improve docs for MOVEREPLICA - correct existing parameter docs.
---
 solr/solr-ref-guide/src/replica-management.adoc                       | 4 ++--
 solr/solrj/src/resources/apispec/collections.collection.Commands.json | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/solr/solr-ref-guide/src/replica-management.adoc b/solr/solr-ref-guide/src/replica-management.adoc
index cf508c3..2d66455 100644
--- a/solr/solr-ref-guide/src/replica-management.adoc
+++ b/solr/solr-ref-guide/src/replica-management.adoc
@@ -170,10 +170,10 @@ The API uses the Autoscaling framework to find nodes that can satisfy the disk r
 The name of the collection. This parameter is required.
 
 `shard`::
-The name of the shard that the replica belongs to. This parameter is required.
+The name of the shard for which a replica should be moved. Either this parameter or replica is required. If replica is specified, this parameter is ignored.
 
 `replica`::
-The name of the replica. This parameter is required.
+The name of the replica to move. Either this parameter or shard is required.
 
 `sourceNode`::
 The name of the node that contains the replica. This parameter is required.
diff --git a/solr/solrj/src/resources/apispec/collections.collection.Commands.json b/solr/solrj/src/resources/apispec/collections.collection.Commands.json
index a2694e1..1d9e6a4 100644
--- a/solr/solrj/src/resources/apispec/collections.collection.Commands.json
+++ b/solr/solrj/src/resources/apispec/collections.collection.Commands.json
@@ -24,11 +24,11 @@
       "properties": {
         "replica": {
           "type": "string",
-          "description": "The name of the replica"
+          "description": "The name of the replica to move. Either this parameter or shard is required."
         },
         "shard": {
           "type": "string",
-          "description": "The name of the shard"
+          "description": "The name of the shard for which a replica should be moved. Either this parameter or replica is required. If replica is specified, this parameter is ignored."
         },
         "sourceNode": {
           "type": "string",


[lucene-solr] 02/02: SOLR-13169 Improve docs for MOVEREPLICA - improve examples

Posted by gu...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

gus pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/lucene-solr.git

commit ff8caeb7f4bc337dff089769dbc60af2c35c8b7d
Author: Gus Heck <gu...@apache.org>
AuthorDate: Fri Jun 5 17:06:26 2020 -0400

    SOLR-13169 Improve docs for MOVEREPLICA - improve examples
---
 solr/solr-ref-guide/src/replica-management.adoc | 65 ++++++++++++++++++++++++-
 1 file changed, 63 insertions(+), 2 deletions(-)

diff --git a/solr/solr-ref-guide/src/replica-management.adoc b/solr/solr-ref-guide/src/replica-management.adoc
index 2d66455..22a3a84 100644
--- a/solr/solr-ref-guide/src/replica-management.adoc
+++ b/solr/solr-ref-guide/src/replica-management.adoc
@@ -162,8 +162,6 @@ This command moves a replica from one node to a new node. In case of shared file
 
 The API uses the Autoscaling framework to find nodes that can satisfy the disk requirements for the replica to be moved but only when an Autoscaling policy is configured. Refer to <<solrcloud-autoscaling-policy-preferences.adoc#solrcloud-autoscaling-policy-preferences,Autoscaling Policy and Preferences>> section for more details.
 
-`/admin/collections?action=MOVEREPLICA&collection=collection&shard=shard&replica=replica&sourceNode=nodeName&targetNode=nodeName`
-
 === MOVEREPLICA Parameters
 
 `collection`::
@@ -184,6 +182,69 @@ The name of the destination node. This parameter is required.
 `async`::
 Request ID to track this action which will be <<collections-api.adoc#asynchronous-calls,processed asynchronously>>.
 
+=== Examples using MOVEREPLICA
+
+[.dynamic-tabs]
+--
+
+[example.tab-pane#v2moveReplica]
+====
+[.tab-label]*V2 API*
+*Input*
+
+`POST /api/c/test2`
+
+[source,json]
+----
+{
+  "move-replica":{
+    "replica":"core_node6",
+    "sourceNode":"localhost:8982_sol",
+    "targetNode": "localhost:8983_solr"
+  }
+}
+----
+*Output*
+
+[source,json]
+----
+{
+    "responseHeader": {
+        "status": 0,
+        "QTime": 3668
+    },
+    "success": "MOVEREPLICA action completed successfully, moved replica=test_shard1_replica_n5 at node=localhost:8982_solr to replica=test_shard1_replica_n7 at node=localhost:8983_solr"
+}
+----
+====
+
+[example.tab-pane#v1createAlias]
+====
+[.tab-label]*V1 API*
+
+*Input*
+
+[source,text]
+----
+http://localhost:8983/solr/admin/collections?action=MOVEREPLICA&collection=test&targetNode=localhost:8983_solr&fromNode=localhost:8982_solr&replica=core_node6
+----
+
+*Output*
+
+[source,json]
+----
+{
+    "responseHeader": {
+        "status": 0,
+        "QTime": 3668
+    },
+    "success": "MOVEREPLICA action completed successfully, moved replica=test_shard1_replica_n5 at node=localhost:8982_solr to replica=test_shard1_replica_n7 at node=localhost:8983_solr"
+}
+----
+====
+--
+
+
 [[deletereplica]]
 == DELETEREPLICA: Delete a Replica