2013-07-16 10:43:47 -04:00
|
|
|
---
|
2014-09-24 12:39:04 -04:00
|
|
|
"Basic scan":
|
2013-07-16 10:43:47 -04:00
|
|
|
- do:
|
|
|
|
indices.create:
|
2014-09-24 12:39:04 -04:00
|
|
|
index: test_scroll
|
|
|
|
body:
|
|
|
|
settings:
|
|
|
|
number_of_shards: "1"
|
|
|
|
- do:
|
|
|
|
index:
|
|
|
|
index: test_scroll
|
|
|
|
type: test
|
|
|
|
id: 42
|
|
|
|
body: { foo: bar }
|
|
|
|
|
2013-07-16 10:43:47 -04:00
|
|
|
- do:
|
|
|
|
index:
|
2014-09-24 12:39:04 -04:00
|
|
|
index: test_scroll
|
|
|
|
type: test
|
|
|
|
id: 43
|
|
|
|
body: { foo: bar }
|
2013-07-16 10:43:47 -04:00
|
|
|
|
|
|
|
- do:
|
|
|
|
indices.refresh: {}
|
|
|
|
|
|
|
|
- do:
|
|
|
|
search:
|
2013-09-16 14:56:32 -04:00
|
|
|
index: test_scroll
|
2013-07-16 10:43:47 -04:00
|
|
|
search_type: scan
|
2014-09-24 12:39:04 -04:00
|
|
|
size: 1
|
2013-09-16 14:56:32 -04:00
|
|
|
scroll: 1m
|
2013-07-16 10:43:47 -04:00
|
|
|
body:
|
|
|
|
query:
|
|
|
|
match_all: {}
|
|
|
|
|
|
|
|
- set: {_scroll_id: scroll_id}
|
2014-09-24 12:39:04 -04:00
|
|
|
- match: {hits.total: 2 }
|
|
|
|
- length: {hits.hits: 0 }
|
|
|
|
|
|
|
|
- do:
|
|
|
|
scroll:
|
|
|
|
scroll_id: $scroll_id
|
|
|
|
scroll: 1m
|
|
|
|
|
|
|
|
- set: {_scroll_id: scroll_id}
|
|
|
|
- match: {hits.total: 2 }
|
|
|
|
- length: {hits.hits: 1 }
|
2013-07-16 10:43:47 -04:00
|
|
|
|
|
|
|
- do:
|
|
|
|
scroll:
|
|
|
|
scroll_id: $scroll_id
|
2014-09-24 12:39:04 -04:00
|
|
|
scroll: 1m
|
|
|
|
|
|
|
|
- set: {_scroll_id: scroll_id}
|
|
|
|
- match: {hits.total: 2 }
|
|
|
|
- length: {hits.hits: 1 }
|
|
|
|
|
|
|
|
- do:
|
|
|
|
scroll:
|
|
|
|
scroll_id: $scroll_id
|
|
|
|
scroll: 1m
|
|
|
|
|
|
|
|
- match: {hits.total: 2 }
|
|
|
|
- length: {hits.hits: 0 }
|
|
|
|
|
|
|
|
---
|
|
|
|
"Basic scroll":
|
|
|
|
- do:
|
|
|
|
indices.create:
|
|
|
|
index: test_scroll
|
|
|
|
- do:
|
|
|
|
index:
|
|
|
|
index: test_scroll
|
|
|
|
type: test
|
|
|
|
id: 42
|
2014-09-25 07:01:34 -04:00
|
|
|
body: { foo: 1 }
|
2014-09-24 12:39:04 -04:00
|
|
|
|
|
|
|
- do:
|
|
|
|
index:
|
|
|
|
index: test_scroll
|
|
|
|
type: test
|
|
|
|
id: 43
|
2014-09-25 07:01:34 -04:00
|
|
|
body: { foo: 2 }
|
2014-09-24 12:39:04 -04:00
|
|
|
|
|
|
|
- do:
|
|
|
|
indices.refresh: {}
|
|
|
|
|
|
|
|
- do:
|
|
|
|
search:
|
|
|
|
index: test_scroll
|
|
|
|
size: 1
|
|
|
|
scroll: 1m
|
2014-09-25 07:01:34 -04:00
|
|
|
sort: foo
|
2014-09-24 12:39:04 -04:00
|
|
|
body:
|
|
|
|
query:
|
|
|
|
match_all: {}
|
|
|
|
|
|
|
|
- set: {_scroll_id: scroll_id}
|
|
|
|
- match: {hits.total: 2 }
|
|
|
|
- length: {hits.hits: 1 }
|
2014-09-25 07:01:34 -04:00
|
|
|
- match: {hits.hits.0._id: "42" }
|
2014-09-24 12:39:04 -04:00
|
|
|
|
|
|
|
- do:
|
|
|
|
index:
|
|
|
|
index: test_scroll
|
|
|
|
type: test
|
2014-09-25 05:45:17 -04:00
|
|
|
id: 44
|
2014-09-25 07:01:34 -04:00
|
|
|
body: { foo: 3 }
|
2014-09-24 12:39:04 -04:00
|
|
|
|
|
|
|
- do:
|
|
|
|
indices.refresh: {}
|
|
|
|
|
|
|
|
- do:
|
|
|
|
scroll:
|
|
|
|
scroll_id: $scroll_id
|
|
|
|
scroll: 1m
|
|
|
|
|
|
|
|
- match: {hits.total: 2 }
|
|
|
|
- length: {hits.hits: 1 }
|
2014-09-25 07:01:34 -04:00
|
|
|
- match: {hits.hits.0._id: "43" }
|
2014-09-24 12:39:04 -04:00
|
|
|
|
2014-09-25 05:45:17 -04:00
|
|
|
- do:
|
|
|
|
scroll:
|
|
|
|
scroll_id: $scroll_id
|
|
|
|
scroll: 1m
|
|
|
|
|
|
|
|
- match: {hits.total: 2 }
|
|
|
|
- length: {hits.hits: 0 }
|
|
|
|
|
2014-09-24 12:39:04 -04:00
|
|
|
- do:
|
|
|
|
clear_scroll:
|
|
|
|
scroll_id: $scroll_id
|
2013-07-16 10:43:47 -04:00
|
|
|
|