blob: b82bf8a2b7992bb212bb4e55e934aabe6a2068de [file] [log] [blame]
{
"documentation": "https://lucene.apache.org/solr/guide/shard-management.html",
"description": "Allows you to create a shard, split an existing shard or add a new replica.",
"methods": [
"POST"
],
"url": {
"paths": [
"/collections/{collection}/shards",
"/c/{collection}/shards"
]
},
"commands": {
"split": {
"type" : "object",
"documentation":"https://lucene.apache.org/solr/guide/shard-management.html#splitshard",
"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."
},
"ranges" : {
"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" : "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://lucene.apache.org/solr/guide/defining-core-properties.html",
"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": "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."
},
"waitForFinalState": {
"type": "boolean",
"description": "If true then request will complete only when all affected replicas become active.",
"default": false
}
}
},
"create": {
"type":"object",
"properties": {
"nodeSet": {
"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.",
"type": "string"
},
"coreProperties": {
"type": "object",
"documentation": "https://lucene.apache.org/solr/guide/defining-core-properties.html",
"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": "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."
},
"waitForFinalState": {
"type": "boolean",
"description": "If true then request will complete only when all affected replicas become active.",
"default": false
}
},
"required":["shard"]
},
"add-replica": {
"documentation":"https://lucene.apache.org/solr/guide/replica-management.html#addreplica",
"description": "",
"type" : "object",
"properties": {
"shard": {
"type": "string",
"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. 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."
},
"instanceDir": {
"type": "string",
"description": "An optional custom instanceDir for this replica."
},
"dataDir": {
"type": "string",
"description": "An optional custom directory used to store index data for this replica."
},
"coreProperties": {
"type": "object",
"documentation": "https://lucene.apache.org/solr/guide/defining-core-properties.html",
"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": "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."
},
"type": {
"type": "string",
"enum":["NRT", "TLOG", "PULL"],
"description": "The type of replica to add. NRT (default), TLOG or PULL"
},
"waitForFinalState": {
"type": "boolean",
"description": "If true then request will complete only when all affected replicas become active.",
"default": false
}
},
"required":["shard"]
}
}
}