mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-03-25 01:19:02 +00:00
Add REST API spec for /_search_shards endpoint
Also adds REST test for /_search_shards Closes #5907
This commit is contained in:
parent
0a84253045
commit
54612ee2b5
51
rest-api-spec/api/search_shards.json
Normal file
51
rest-api-spec/api/search_shards.json
Normal file
@ -0,0 +1,51 @@
|
||||
{
|
||||
"search_shards": {
|
||||
"documentation": "http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/search-shards.html",
|
||||
"methods": ["GET", "POST"],
|
||||
"url": {
|
||||
"path": "/{index}/{type}/_search_shards",
|
||||
"paths": ["/_search_shards", "/{index}/_search_shards", "/{index}/{type}/_search_shards"],
|
||||
"parts": {
|
||||
"index": {
|
||||
"type" : "string",
|
||||
"required" : false,
|
||||
"description" : "The name of the index"
|
||||
},
|
||||
"type": {
|
||||
"type" : "string",
|
||||
"required" : false,
|
||||
"description" : "The type of the document"
|
||||
}
|
||||
},
|
||||
"params": {
|
||||
"preference": {
|
||||
"type" : "string",
|
||||
"description" : "Specify the node or shard the operation should be performed on (default: random)"
|
||||
},
|
||||
"routing": {
|
||||
"type" : "string",
|
||||
"description" : "Specific routing value"
|
||||
},
|
||||
"local": {
|
||||
"type": "boolean",
|
||||
"description": "Return local information, do not retrieve the state from master node (default: false)"
|
||||
},
|
||||
"ignore_unavailable": {
|
||||
"type" : "boolean",
|
||||
"description" : "Whether specified concrete indices should be ignored when unavailable (missing or closed)"
|
||||
},
|
||||
"allow_no_indices": {
|
||||
"type" : "boolean",
|
||||
"description" : "Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)"
|
||||
},
|
||||
"expand_wildcards": {
|
||||
"type" : "enum",
|
||||
"options" : ["open","closed"],
|
||||
"default" : "open",
|
||||
"description" : "Whether to expand wildcard expression to concrete indices that are open, closed or both."
|
||||
}
|
||||
}
|
||||
},
|
||||
"body": null
|
||||
}
|
||||
}
|
16
rest-api-spec/test/search_shards/10_basic.yaml
Normal file
16
rest-api-spec/test/search_shards/10_basic.yaml
Normal file
@ -0,0 +1,16 @@
|
||||
---
|
||||
"Basic /_search_shards test":
|
||||
- do:
|
||||
indices.create:
|
||||
index: test_1
|
||||
|
||||
- do:
|
||||
cluster.health:
|
||||
wait_for_status: yellow
|
||||
|
||||
- do:
|
||||
search_shards:
|
||||
index: test_1
|
||||
routing: foo
|
||||
|
||||
- match: { shards.0.0.index: test_1 }
|
Loading…
x
Reference in New Issue
Block a user