OpenSearch/rest-api-spec/api/mtermvectors.json
Alex Ksikes c4830cf862 Term Vectors: support for realtime
By default term vectors are now realtime, as opposed to previously near
realtime. If they are not found in the index, they will be generated on the
fly. The document is fetched from the transaction log and treated as an
artificial document. One can set `realtime` parameter to `false` in order to
disable this functionality. This consequently makes the MLT query realtime in
fetching documents, as it previsouly used to be before switching from using
the multi get API to the mtv API.

Closes #7846
2014-10-03 09:26:47 +02:00

91 lines
3.9 KiB
JSON

{
"mtermvectors" : {
"documentation" : "http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/docs-multi-termvectors.html",
"methods" : ["GET", "POST"],
"url" : {
"path" : "/_mtermvectors",
"paths" : ["/_mtermvectors", "/{index}/_mtermvectors", "/{index}/{type}/_mtermvectors"],
"parts" : {
"index" : {
"type" : "string",
"description" : "The index in which the document resides."
},
"type" : {
"type" : "string",
"description" : "The type of the document."
},
"id" : {
"type" : "string",
"description" : "The id of the document."
}
},
"params" : {
"ids" : {
"type" : "list",
"description" : "A comma-separated list of documents ids. You must define ids as parameter or set \"ids\" or \"docs\" in the request body",
"required" : false
},
"term_statistics" : {
"type" : "boolean",
"description" : "Specifies if total term frequency and document frequency should be returned. Applies to all returned documents unless otherwise specified in body \"params\" or \"docs\".",
"default" : false,
"required" : false
},
"field_statistics" : {
"type" : "boolean",
"description" : "Specifies if document count, sum of document frequencies and sum of total term frequencies should be returned. Applies to all returned documents unless otherwise specified in body \"params\" or \"docs\".",
"default" : true,
"required" : false
},
"fields" : {
"type" : "list",
"description" : "A comma-separated list of fields to return. Applies to all returned documents unless otherwise specified in body \"params\" or \"docs\".",
"required" : false
},
"offsets" : {
"type" : "boolean",
"description" : "Specifies if term offsets should be returned. Applies to all returned documents unless otherwise specified in body \"params\" or \"docs\".",
"default" : true,
"required" : false
},
"positions" : {
"type" : "boolean",
"description" : "Specifies if term positions should be returned. Applies to all returned documents unless otherwise specified in body \"params\" or \"docs\".",
"default" : true,
"required" : false
},
"payloads" : {
"type" : "boolean",
"description" : "Specifies if term payloads should be returned. Applies to all returned documents unless otherwise specified in body \"params\" or \"docs\".",
"default" : true,
"required" : false
},
"preference" : {
"type" : "string",
"description" : "Specify the node or shard the operation should be performed on (default: random) .Applies to all returned documents unless otherwise specified in body \"params\" or \"docs\".",
"required" : false
},
"routing" : {
"type" : "string",
"description" : "Specific routing value. Applies to all returned documents unless otherwise specified in body \"params\" or \"docs\".",
"required" : false
},
"parent" : {
"type" : "string",
"description" : "Parent id of documents. Applies to all returned documents unless otherwise specified in body \"params\" or \"docs\".",
"required" : false
},
"realtime": {
"type" : "boolean",
"description" : "Specifies if requests are real-time as opposed to near-real-time (default: true).",
"required" : false
}
}
},
"body" : {
"description" : "Define ids, parameters or a list of parameters per document here. You must at least provide a list of document ids. See documentation.",
"required" : false
}
}
}