elasticsearch-scrolltoend
Advanced tools
Comparing version
{ | ||
"name": "elasticsearch-scrolltoend", | ||
"version": "0.0.2", | ||
"version": "0.0.3", | ||
"description": "Elasticsearch extension for processing scroll results.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -5,3 +5,3 @@ # [elasticsearch](https://github.com/elastic/elasticsearch-js)-scrolltoend | ||
This module provides a new `scrollToEnd` function which allows for processing each batch while scrolling search results. | ||
This module provides `scrollToEnd` function which allows for processing each batch while scrolling search results. | ||
@@ -28,1 +28,10 @@ ## Setup | ||
``` | ||
## Example | ||
```js | ||
let index = `products`; | ||
let scroll = '60s'; | ||
let scrollToEnd = client.scrollToEnd(scroll, res => console.log(res)); | ||
return client.search({index, scroll, search_type: 'scan'}).then(scrollToEnd); | ||
``` |
Sorry, the diff of this file is not supported yet
Empty package
Supply chain riskPackage does not contain any code. It may be removed, is name squatting, or the result of a faulty package publish.
Found 1 instance in 1 package
3562
42.37%5
25%27
Infinity%36
33.33%0
-100%