Added the API definition for indexing a document

This commit is contained in:
Karel Minarik 2013-05-26 19:44:03 +02:00
parent 6f1a1b6254
commit 4bfe7bc797

View File

@ -7,39 +7,84 @@
"paths": ["/{index}/{type}", "/{index}/{type}/{id}", "/{index}/{type}/{id}/_create"], "paths": ["/{index}/{type}", "/{index}/{type}/{id}", "/{index}/{type}/{id}/_create"],
"parts": { "parts": {
"id": { "id": {
"type" : "string",
"description" : "Document ID"
}, },
"index": { "index": {
"type" : "string",
"required" : true,
"description" : "The name of the index"
}, },
"type": { "type": {
"type" : "string",
"required" : true,
"description" : "The type of the document"
} }
}, },
"params": { "params": {
"consistency": { "consistency": {
"type" : "enum",
"options" : ["one", "quorum", "all"],
"description" : "Explicit write consistency setting for the operation"
}, },
"id": { "id": {
"type" : "string",
"description" : "Specific document ID (when the POST method is used)"
}, },
"op_type": { "op_type": {
"type" : "enum",
"options" : ["index", "create"],
"default" : "index",
"description" : "Explicit operation type"
}, },
"parent": { "parent": {
"type" : "string",
"description" : "ID of the parent document"
}, },
"percolate": { "percolate": {
"type" : "string",
"description" : "Percolator queries to execute while indexing the document"
}, },
"refresh": { "refresh": {
"type" : "boolean",
"description" : "Refresh the index after performing the operation"
}, },
"replication": { "replication": {
"type" : "enum",
"options" : ["sync","async"],
"default" : "sync",
"description" : "Specific replication type"
}, },
"routing": { "routing": {
"type" : "string",
"description" : "Specific routing value"
}, },
"timeout": { "timeout": {
"type" : "time",
"description" : "Explicit operation timeout"
}, },
"timestamp": { "timestamp": {
"type" : "time",
"description" : "Explicit timestamp for the document"
}, },
"ttl": { "ttl": {
"type" : "duration",
"description" : "Expiration time for the document"
},
"version" : {
"type" : "number",
"description" : "Explicit version number for concurrency control"
}, },
"version_type": { "version_type": {
"type" : "enum",
"options" : ["internal","external"],
"description" : "Specific version type"
} }
} }
}, },
"body": null "body": {
"description" : "The document",
"required" : true
}
} }
} }