
apispec.collections.collection.Commands.json Maven / Gradle / Ivy
{
"documentation": "https://lucene.apache.org/solr/guide/collections-api.html",
"description": "Several collection-level operations are supported with this endpoint: modify collection attributes; reload a collection; migrate documents to a different collection; rebalance collection leaders; balance properties across shards; and add or delete a replica property.",
"methods": [
"POST"
],
"url": {
"paths": [
"/collections/{collection}",
"/c/{collection}"
]
},
"commands": {
"modify": {
"#include": "collections.collection.Commands.modify"
},
"reload": {
"#include": "collections.collection.Commands.reload"
},
"migrate-docs":{
"type":"object",
"documentation":"https://lucene.apache.org/solr/guide/collections-api.html#migrate",
"description": "Moves documents with a given routing key to another collection. The source collection will continue to have the same documents, but will start re-routing write requests to the new collection. This command only works on collections using the 'compositeId' type of document routing.",
"properties":{
"target":{
"type":"string",
"description":"The name of the collection to which documents will be migrated."
},
"splitKey":{
"type":"string",
"description":"The routing key prefix. For example, if uniqueKey is a!123, then you would use split.key=a! This key may span multiple shards on source and target collections. The migration will be completed shard-by-shard in a single thread."
},
"forwardTimeout":{
"type":"integer",
"description":"The timeout, in seconds, until which write requests made to the source collection for the given splitKey will be forwarded to the target shard. Once this time is up, write requests will be routed to the target collection. Any applications sending read or write requests should be modified once the migration is complete to send documents to the right collection.",
"default": "60"
},
"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."
}
},
"required":["target", "splitKey"]
},
"balance-shard-unique":{
"type":"object",
"documentation": "https://lucene.apache.org/solr/guide/collections-api.html#balanceshardunique",
"description": "Insures a property is distributed equally across all physical nodes of a collection. If the property already exists on a replica, effort is made to leave it there. However, if it does not exist on any repica, a shard will be chosen and the property added.",
"properties":{
"property":{
"type":"string",
"description": "The property to balance across nodes. This can be entered as 'property.' or simply ''. If the 'property.' prefix is not defined, it will be added automatically."
},
"onlyactivenodes":{
"type":"boolean",
"description": "Normally, a property is instantiated on active nodes only. If this parameter is specified as 'false', then inactive nodes are also included for distribution.",
"default": "true"
},
"shardUnique":{
"type":"boolean",
"description": "There is one pre-defined property (preferredLeader) that defaults this value to 'true'. For all other properties that are balanced, this must be set to 'true' or an error message is returned."
}
},
"required":["property"]
},
"rebalance-leaders" :{
"type":"object",
"documentation": "https://lucene.apache.org/solr/guide/collections-api.html#rebalanceleaders",
"description": "Reassign leaders in a collection according to the preferredLeader property across active nodes. This command should be run after the preferredLeader property has been set with the balance-shards or add-replica-property commands.",
"properties":{
"maxAtOnce":{
"type":"integer",
"description":"The maximum number of reassignments to have in the queue at one time. Values <=0 use the default value Integer.MAX_VALUE. When this number is reached, the process waits for one or more leaders to be successfully assigned before adding more to the queue."
},
"maxWaitSeconds":{
"type":"integer",
"description":"Timeout, in seconds, when waiting for leaders to be reassigned. If maxAtOnce is less than the number of reassignments pending, this is the maximum interval for any single reassignment.",
"default": "60"
}
}
},
"add-replica-property": {
"documentation": "https://lucene.apache.org/solr/guide/collections-api.html#addreplicaprop",
"description": "Assign an arbitrary property to a particular replica and give it the value specified. If the property already exists, it will be overwritten with the new value.",
"type": "object",
"properties": {
"shard": {
"type": "string",
"description": "The name of the shard the replica belongs to."
},
"replica": {
"type": "string",
"description": "The name of the replica."
},
"name": {
"type": "string",
"description": "The name of the property. This can be entered as 'property.' or simply ''. If the 'property.' prefix is not defined, it will be added automatically."
},
"value": {
"type": "string",
"description": "The value to assign to the property."
},
"shardUnique": {
"type": "boolean",
"description": "If true, setting this property in one replica will remove the property from all other replicas in that shard.",
"default": "false"
}
},
"required": [
"name",
"value",
"shard",
"replica"
]
},
"delete-replica-property": {
"description": "Deletes an arbitrary property from a particular replica",
"documentation": "https://lucene.apache.org/solr/guide/collections-api.html#deletereplicaprop",
"type": "object",
"properties": {
"shard": {
"type": "string",
"description": "The name of the shard the replica belongs to."
},
"replica": {
"type": "string",
"description": "The name of the replica."
},
"property": {
"type": "string",
"description": "The name of the property to remove."
}
},
"required":["shard","replica","property"]
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy