Exists as separate endpoint

This commit is contained in:
Honza Kral 2013-06-04 13:31:37 +02:00
parent c505079bac
commit b8eee37882
2 changed files with 51 additions and 1 deletions

View File

@ -0,0 +1,50 @@
{
"exists": {
"documentation": "http://elasticsearch.org/guide/reference/api/get/",
"methods": ["HEAD"],
"url": {
"path": "/{index}/{type}/{id}",
"paths": ["/{index}/{type}/{id}"],
"parts": {
"id": {
"type" : "string",
"required" : true,
"description" : "The document ID"
},
"index": {
"type" : "string",
"required" : true,
"description" : "The name of the index"
},
"type": {
"type" : "string",
"required" : true,
"description" : "The type of the document (use `_all` to fetch the first document matching the ID across all types)"
}
},
"params": {
"parent": {
"type" : "string",
"description" : "The ID of the parent document"
},
"preference": {
"type" : "string",
"description" : "Specify the shards the operation should be performed on (default: random shard)"
},
"realtime": {
"type" : "boolean",
"description" : "Specify whether to perform the operation in realtime or search mode"
},
"refresh": {
"type" : "boolean",
"description" : "Refresh the shard containing the document before performing the operation"
},
"routing": {
"type" : "string",
"description" : "Specific routing value"
}
}
},
"body": null
}
}

View File

@ -1,7 +1,7 @@
{
"get": {
"documentation": "http://elasticsearch.org/guide/reference/api/get/",
"methods": ["GET", "HEAD", "POST"],
"methods": ["GET"],
"url": {
"path": "/{index}/{type}/{id}",
"paths": ["/{index}/{type}/{id}", "/{index}/{type}/{id}/_source"],