From 34ace1ff91d73cb41242f0405439ebb496fcd4d3 Mon Sep 17 00:00:00 2001 From: Honza Kral Date: Tue, 4 Jun 2013 16:33:24 +0200 Subject: [PATCH] Split scroll as separate endpoint --- rest-api-spec/api/scroll.json | 29 +++++++++++++++++++++++++++++ rest-api-spec/api/search.json | 10 +--------- 2 files changed, 30 insertions(+), 9 deletions(-) create mode 100644 rest-api-spec/api/scroll.json diff --git a/rest-api-spec/api/scroll.json b/rest-api-spec/api/scroll.json new file mode 100644 index 00000000000..0db1fe31ce0 --- /dev/null +++ b/rest-api-spec/api/scroll.json @@ -0,0 +1,29 @@ +{ + "search": { + "documentation": "http://www.elasticsearch.org/guide/reference/api/search/", + "methods": ["GET", "POST"], + "url": { + "path": "/_search/scroll", + "paths": ["/_search/scroll", "/_search/scroll/{scroll_id}"], + "parts": { + "scroll_id": { + "type" : "string", + "description" : "The scroll ID" + } + }, + "params": { + "scroll": { + "type" : "duration", + "description" : "Specify how long a consistent view of the index should be maintained for scrolled search" + }, + "scroll_id": { + "type" : "string", + "description" : "The scroll ID for scrolled search" + } + } + }, + "body": { + "description": "The scroll ID if not passed by URL or query parameter." + } + } +} diff --git a/rest-api-spec/api/search.json b/rest-api-spec/api/search.json index ade5d78d8f0..33a4546555f 100644 --- a/rest-api-spec/api/search.json +++ b/rest-api-spec/api/search.json @@ -4,7 +4,7 @@ "methods": ["GET", "POST"], "url": { "path": "/_search", - "paths": ["/_search", "/{index}/_search", "/{index}/{type}/_search", "/_search/scroll", "/_search/scroll/{scroll_id}"], + "paths": ["/_search", "/{index}/_search", "/{index}/{type}/_search"], "parts": { "index": { "type" : "list", @@ -13,10 +13,6 @@ "type": { "type" : "list", "description" : "A comma-separated list of document types to search; leave empty to perform the operation on all types" - }, - "scroll_id": { - "type" : "string", - "description" : "The scroll ID" } }, "params": { @@ -87,10 +83,6 @@ "type" : "duration", "description" : "Specify how long a consistent view of the index should be maintained for scrolled search" }, - "scroll_id": { - "type" : "string", - "description" : "The scroll ID for scrolled search" - }, "search_type": { "type" : "enum", "options" : ["query_then_fetch", "query_and_fetch", "dfs_query_then_fetch", "dfs_query_and_fetch", "count", "scan"],