mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-02-09 14:35:04 +00:00
0955c127c0
Change analyze.asciidoc and scroll.asciidoc Add json support to Analyze and Scroll, and clear scrollAPI Add rest-api-spec/test Closes #5866
81 lines
1.4 KiB
YAML
81 lines
1.4 KiB
YAML
---
|
|
"Clear scroll":
|
|
- do:
|
|
indices.create:
|
|
index: test_scroll
|
|
- do:
|
|
index:
|
|
index: test_scroll
|
|
type: test
|
|
id: 42
|
|
body: { foo: bar }
|
|
|
|
- do:
|
|
indices.refresh: {}
|
|
|
|
- do:
|
|
search:
|
|
index: test_scroll
|
|
search_type: scan
|
|
scroll: 1m
|
|
body:
|
|
query:
|
|
match_all: {}
|
|
|
|
- set: {_scroll_id: scroll_id1}
|
|
|
|
- do:
|
|
clear_scroll:
|
|
scroll_id: $scroll_id1
|
|
|
|
- do:
|
|
catch: missing
|
|
scroll:
|
|
scroll_id: $scroll_id1
|
|
|
|
- do:
|
|
catch: missing
|
|
clear_scroll:
|
|
scroll_id: $scroll_id1
|
|
|
|
---
|
|
"Body params override query string":
|
|
- do:
|
|
indices.create:
|
|
index: test_scroll
|
|
- do:
|
|
index:
|
|
index: test_scroll
|
|
type: test
|
|
id: 42
|
|
body: { foo: bar }
|
|
|
|
- do:
|
|
indices.refresh: {}
|
|
|
|
- do:
|
|
search:
|
|
index: test_scroll
|
|
search_type: scan
|
|
scroll: 1m
|
|
body:
|
|
query:
|
|
match_all: {}
|
|
|
|
- set: {_scroll_id: scroll_id1}
|
|
|
|
- do:
|
|
clear_scroll:
|
|
scroll_id: "invalid_scroll_id"
|
|
body: { "scroll_id": [ "$scroll_id1" ]}
|
|
|
|
- do:
|
|
catch: missing
|
|
scroll:
|
|
scroll_id: $scroll_id1
|
|
|
|
- do:
|
|
catch: missing
|
|
clear_scroll:
|
|
scroll_id: $scroll_id1
|