|
@@ -1,14 +1,24 @@
|
|
|
---
|
|
|
-"Basic scroll":
|
|
|
+"Basic scan":
|
|
|
- do:
|
|
|
indices.create:
|
|
|
- index: test_scroll
|
|
|
+ index: test_scroll
|
|
|
+ body:
|
|
|
+ settings:
|
|
|
+ number_of_shards: "1"
|
|
|
+ - do:
|
|
|
+ index:
|
|
|
+ index: test_scroll
|
|
|
+ type: test
|
|
|
+ id: 42
|
|
|
+ body: { foo: bar }
|
|
|
+
|
|
|
- do:
|
|
|
index:
|
|
|
- index: test_scroll
|
|
|
- type: test
|
|
|
- id: 42
|
|
|
- body: { foo: bar }
|
|
|
+ index: test_scroll
|
|
|
+ type: test
|
|
|
+ id: 43
|
|
|
+ body: { foo: bar }
|
|
|
|
|
|
- do:
|
|
|
indices.refresh: {}
|
|
@@ -17,16 +27,96 @@
|
|
|
search:
|
|
|
index: test_scroll
|
|
|
search_type: scan
|
|
|
+ size: 1
|
|
|
scroll: 1m
|
|
|
body:
|
|
|
query:
|
|
|
match_all: {}
|
|
|
|
|
|
- set: {_scroll_id: scroll_id}
|
|
|
+ - 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 }
|
|
|
|
|
|
- do:
|
|
|
scroll:
|
|
|
scroll_id: $scroll_id
|
|
|
+ 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
|
|
|
+ body: { foo: bar }
|
|
|
+
|
|
|
+ - do:
|
|
|
+ index:
|
|
|
+ index: test_scroll
|
|
|
+ type: test
|
|
|
+ id: 43
|
|
|
+ body: { foo: bar }
|
|
|
+
|
|
|
+ - do:
|
|
|
+ indices.refresh: {}
|
|
|
+
|
|
|
+ - do:
|
|
|
+ search:
|
|
|
+ index: test_scroll
|
|
|
+ size: 1
|
|
|
+ scroll: 1m
|
|
|
+ body:
|
|
|
+ query:
|
|
|
+ match_all: {}
|
|
|
+
|
|
|
+ - set: {_scroll_id: scroll_id}
|
|
|
+ - match: {hits.total: 2 }
|
|
|
+ - length: {hits.hits: 1 }
|
|
|
+
|
|
|
+ - do:
|
|
|
+ index:
|
|
|
+ index: test_scroll
|
|
|
+ type: test
|
|
|
+ id: 42
|
|
|
+ body: { foo: bar }
|
|
|
+
|
|
|
+ - do:
|
|
|
+ indices.refresh: {}
|
|
|
+
|
|
|
+ - do:
|
|
|
+ scroll:
|
|
|
+ scroll_id: $scroll_id
|
|
|
+ scroll: 1m
|
|
|
+
|
|
|
+ - match: {hits.total: 2 }
|
|
|
+ - length: {hits.hits: 1 }
|
|
|
+
|
|
|
+ - do:
|
|
|
+ clear_scroll:
|
|
|
+ scroll_id: $scroll_id
|
|
|
|
|
|
- - match: {hits.total: 1 }
|
|
|
- - match: {hits.hits.0._id: "42" }
|