lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ctarg...@apache.org
Subject [2/4] lucene-solr:apiv2: Finish up Collection specs
Date Tue, 13 Dec 2016 15:38:29 GMT
Finish up Collection specs


Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/e7e8c654
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/e7e8c654
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/e7e8c654

Branch: refs/heads/apiv2
Commit: e7e8c6548d5fa19d07bdd0d000affd8cfec4aafb
Parents: 4eb1f3d
Author: Cassandra Targett <ctargett@apache.org>
Authored: Mon Dec 12 12:58:56 2016 -0600
Committer: Cassandra Targett <ctargett@apache.org>
Committed: Mon Dec 12 12:58:56 2016 -0600

----------------------------------------------------------------------
 .../collections.collection.shards.Commands.json | 37 ++++++++++++--------
 ...ctions.collection.shards.shard.Commands.json |  5 +--
 ...lections.collection.shards.shard.delete.json |  3 +-
 ....collection.shards.shard.replica.delete.json | 21 +++++------
 .../core/src/resources/apispec/collections.json |  1 +
 5 files changed, 40 insertions(+), 27 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/e7e8c654/solr/core/src/resources/apispec/collections.collection.shards.Commands.json
----------------------------------------------------------------------
diff --git a/solr/core/src/resources/apispec/collections.collection.shards.Commands.json b/solr/core/src/resources/apispec/collections.collection.shards.Commands.json
index 67f2383..7a959d0 100644
--- a/solr/core/src/resources/apispec/collections.collection.shards.Commands.json
+++ b/solr/core/src/resources/apispec/collections.collection.shards.Commands.json
@@ -1,5 +1,6 @@
 {
   "documentation": "https://cwiki.apache.org/confluence/display/solr/Collections+API",
+  "description": "Allows you to create a shard, split an existing shard or add a new replica.",
   "methods": [
     "POST"
   ],
@@ -13,26 +14,29 @@
     "split": {
       "type" : "object",
       "documentation":"https://cwiki.apache.org/confluence/display/solr/Collections+API#CollectionsAPI-api3",
+      "description": "Splits an existing shard into two or more new shards. During this action,
the existing shard will continue to contain the original data, but new data will be routed
to the new shards once the split is complete. New shards will have as many replicas as the
existing shards. A soft commit will be done automatically. An explicit commit request is not
required because the index is automatically saved to disk during the split operation. New
shards will use the original shard name as the basis for their names, adding an underscore
and a number to differentiate the new shard. For example, 'shard1' would become 'shard1_0'
and 'shard1_1'. Note that this operation can take a long time to complete.",
       "properties": {
         "shard":{
           "type":"string",
-          "description":"The name of the shard to be split"
+          "description":"The name of the shard to be split."
         },
         "ranges" : {
-          "description" : "A comma-separated list of hash ranges in hexadecimal e.g. ranges=0-1f4,1f5-3e8,3e9-5dc",
+          "description" : "A comma-separated list of hexadecimal hash ranges that will be
used to split the shard into new shards containing each defined range, e.g. ranges=0-1f4,1f5-3e8,3e9-5dc.
This is the only option that allows splitting a single shard into more than 2 additional shards.
If neither this parameter nor splitKey are defined, the shard will be split into two equal
new shards.",
           "type":"string"
         },
         "splitKey":{
-          "description" : "The key to use for splitting the index",
+          "description" : "A route key to use for splitting the index. If this is defined,
the shard parameter is not required because the route key will identify the correct shard.
A route key that spans more than a single shard is not supported. If neither this parameter
nor ranges are defined, the shard will be split into two equal new shards.",
           "type":"string"
         },
         "coreProperties":{
           "type":"object",
+          "documentation": "https://cwiki.apache.org/confluence/display/solr/Defining+core.properties",
+          "description": "Allows adding core.properties for the collection. Some examples
of core properties you may want to modify include the config set, the node name, the data
directory, among others.",
           "additionalProperties":true
         },
         "async": {
           "type": "string",
-          "description": "Request ID to track this action which will be processed asynchronously"
+          "description": "Defines a request ID that can be used to track this action after
it's submitted. The action will be processed asynchronously when this is defined. This command
can be long-running, so running it asynchronously is recommended."
         }
       }
     },
@@ -40,57 +44,62 @@
       "type":"object",
       "properties": {
         "nodeSet": {
-          "description": "list of node names",
+          "description": "Defines nodes to spread the new collection across. If not provided,
the collection will be spread across all live Solr nodes. The names to use are the 'node_name',
which can be found by a request to the cluster/nodes endpoint.",
           "type": "array",
           "items": {
             "type": "string"
           }
         },
         "shard": {
-          "description": "The name of the shard to be created",
+          "description": "The name of the shard to be created.",
           "type": "string"
         },
         "coreProperties": {
           "type": "object",
+          "documentation": "https://cwiki.apache.org/confluence/display/solr/Defining+core.properties",
+          "description": "Allows adding core.properties for the collection. Some examples
of core properties you may want to modify include the config set, the node name, the data
directory, among others.",
           "additionalProperties": true
         },
         "async": {
           "type": "string",
-          "description": "Request ID to track this action which will be processed asynchronously"
+          "description": "Defines a request ID that can be used to track this action after
it's submitted. The action will be processed asynchronously when this is defined."
         }
       }
     },
     "add-replica": {
-      "documentation":"",
+      "documentation":"https://cwiki.apache.org/confluence/display/solr/Collections+API#CollectionsAPI-api_addreplica",
+      "description": "",
       "type" : "object",
       "properties": {
         "shard": {
           "type": "string",
-          "description": "The name of the shard in which this replica should be created"
+          "description": "The name of the shard in which this replica should be created.
If this parameter is not specified, then '_route_' must be defined."
         },
         "_route_": {
           "type": "string",
-          "description": "If the exact shard name is not known, users may pass the _route_
value and the system would identify the name of the shard. Ignored if the shard param is also
specified"
+          "description": "If the exact shard name is not known, users may pass the _route_
value and the system would identify the name of the shard. Ignored if the shard param is also
specified. If the 'shard' parameter is also defined, this parameter will be ignored."
         },
         "node": {
           "type": "string",
-          "description": "The name of the node where the replica should be created"
+          "description": "The name of the node where the replica should be created."
         },
         "instanceDir": {
           "type": "string",
-          "description": "The instanceDir for the core that will be created"
+          "description": "An optional custom instanceDir for this replica."
         },
         "dataDir": {
           "type": "string",
-          "description": "The directory in which the core should be created"
+          "description": "An optional custom directory used to store index data for this
replica."
         },
         "coreProperties": {
           "type": "object",
+          "documentation": "https://cwiki.apache.org/confluence/display/solr/Defining+core.properties",
+          "description": "Allows adding core.properties for the collection. Some examples
of core properties you may want to modify include the config set and the node name, among
others.",
           "additionalProperties": true
         },
         "async": {
           "type": "string",
-          "description": "Request ID to track this action which will be processed asynchronously"
+          "description": "Defines a request ID that can be used to track this action after
it's submitted. The action will be processed asynchronously when this is defined."
         }
       }
     }

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/e7e8c654/solr/core/src/resources/apispec/collections.collection.shards.shard.Commands.json
----------------------------------------------------------------------
diff --git a/solr/core/src/resources/apispec/collections.collection.shards.shard.Commands.json
b/solr/core/src/resources/apispec/collections.collection.shards.shard.Commands.json
index 54e4abf..83f7ddf 100644
--- a/solr/core/src/resources/apispec/collections.collection.shards.shard.Commands.json
+++ b/solr/core/src/resources/apispec/collections.collection.shards.shard.Commands.json
@@ -1,5 +1,6 @@
 {
-  "documentation": "https://cwiki.apache.org",
+  "documentation": "https://cwiki.apache.org/confluence/display/solr/Collections+API",
+  "description": "Commands to force leader election and synchronize shards.",
   "methods": [
     "POST",
     "DELETE"
@@ -12,8 +13,8 @@
   },
   "commands": {
     "force-leader": {
-      "description": "In the unlikely event of a shard losing its leader, this command can
be invoked to force the election of a new leader",
       "documentation": "https://cwiki.apache.org/confluence/display/solr/Collections+API#CollectionsAPI-ForceLeader",
+      "description": "In the unlikely event of a shard losing its leader, this command can
be invoked to force the election of a new leader",
       "type": "object"
     },
     "sync-shard": {

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/e7e8c654/solr/core/src/resources/apispec/collections.collection.shards.shard.delete.json
----------------------------------------------------------------------
diff --git a/solr/core/src/resources/apispec/collections.collection.shards.shard.delete.json
b/solr/core/src/resources/apispec/collections.collection.shards.shard.delete.json
index 11dc291..67a6323 100644
--- a/solr/core/src/resources/apispec/collections.collection.shards.shard.delete.json
+++ b/solr/core/src/resources/apispec/collections.collection.shards.shard.delete.json
@@ -1,5 +1,6 @@
 {
-  "documentation": "https://cwiki.apache.org",
+  "documentation": "https://cwiki.apache.org/confluence/display/solr/Collections+API#CollectionsAPI-api7",
+  "description": "Deletes a shard by unloading all replicas of the shard, removing it from
clusterstate.json, and by default deleting the instanceDir and dataDir. Only inactive shards
or those which have no range for custom sharding will be deleted.",
   "methods": [
     "DELETE"
   ],

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/e7e8c654/solr/core/src/resources/apispec/collections.collection.shards.shard.replica.delete.json
----------------------------------------------------------------------
diff --git a/solr/core/src/resources/apispec/collections.collection.shards.shard.replica.delete.json
b/solr/core/src/resources/apispec/collections.collection.shards.shard.replica.delete.json
index 304233d..a0c8ee6 100644
--- a/solr/core/src/resources/apispec/collections.collection.shards.shard.replica.delete.json
+++ b/solr/core/src/resources/apispec/collections.collection.shards.shard.replica.delete.json
@@ -1,5 +1,6 @@
 {
-  "documentation": "https://cwiki.apache.org",
+  "documentation": "https://cwiki.apache.org/confluence/display/solr/Collections+API#CollectionsAPI-api9",
+  "description": "Deletes a replica. If the responding node is up, the core is unloaded,
the entry removed from clusterstate.json, and the instanceDir and dataDir removed. If the
node is not up, the entry for the replica is removed from clusterstate.json; if the nodes
comes up later, the replica is automatically de-registered.",
   "methods": [
     "DELETE"
   ],
@@ -11,27 +12,27 @@
     "params": {
       "onlyIfDown": {
         "type": "boolean",
-        "default": false,
-        "description": "When set to 'true' will not take any action if the replica is active.
Default 'false"
+        "default": "false",
+        "description": "When set to 'true', no action will be taken if the replica is active."
       },
       "deleteIndex": {
         "type": "boolean",
-        "default": false,
-        "description": "By default Solr will delete the index of the replica that is deleted.
Set this to false to prevent the index directory from being deleted"
+        "default": "true",
+        "description": "By default Solr will delete the index of the replica that is deleted.
Set this to false to prevent the index directory from being deleted."
       },
       "deleteDataDir": {
         "type": "boolean",
-        "default": false,
-        "description": "By default Solr will delete the dataDir of the replica that is deleted.
Set this to false to prevent the data directory from being deleted"
+        "default": "true",
+        "description": "By default Solr will delete the dataDir of the replica that is deleted.
Set this to false to prevent the data directory from being deleted."
       },
       "deleteInstanceDir": {
         "type": "boolean",
-        "default": false,
-        "description": "By default Solr will delete the entire instanceDir of the replica
that is deleted. Set this to false to prevent the instance directory from being deleted"
+        "default": "true",
+        "description": "By default Solr will delete the entire instanceDir of the replica
that is deleted. Set this to false to prevent the instance directory from being deleted."
       },
       "async":{
         "type":"string",
-        "description":"Request ID to track this action which will be processed asynchronously."
+        "description":"Defines a request ID that can be used to track this action after it's
submitted. The action will be processed asynchronously when this is defined."
       }
     }
   }

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/e7e8c654/solr/core/src/resources/apispec/collections.json
----------------------------------------------------------------------
diff --git a/solr/core/src/resources/apispec/collections.json b/solr/core/src/resources/apispec/collections.json
index 0742fca..49ca976 100644
--- a/solr/core/src/resources/apispec/collections.json
+++ b/solr/core/src/resources/apispec/collections.json
@@ -1,5 +1,6 @@
 {
   "documentation": "https://cwiki.apache.org/confluence/display/solr/Collections+API#CollectionsAPI-api1",
+  "description": "List all available collections and their properties.",
   "methods": [
     "GET"
   ],


Mime
View raw message