elasticsearch-scroll-stream
Advanced tools
Comparing version 1.1.1 to 1.1.2
@@ -49,2 +49,5 @@ /** | ||
// set the total matching documents | ||
self._total = response.hits.total; | ||
var objectMode = self._readableState.objectMode; | ||
@@ -77,3 +80,2 @@ response.hits.hits.forEach(function(hit) { | ||
self._counter = 0; | ||
self._total = response.hits.total; | ||
self._forceClose = false; | ||
@@ -80,0 +82,0 @@ self.push(null); |
{ | ||
"name": "elasticsearch-scroll-stream", | ||
"version": "1.1.1", | ||
"version": "1.1.2", | ||
"description": "Elasticsearch Scroll query results as a Stream", | ||
@@ -5,0 +5,0 @@ "repository": { |
@@ -18,5 +18,5 @@ | ||
In addition it exposes a `#close()` method to force the stream to stop sourcing from Elasticsearch. | ||
When the stream is done, it will contain an attribute `_total` that is the total number of matching documents, which can be useful if you forced the stream to stop. | ||
When the stream begins to be consumed (starting from the first `data` event), it will contain an attribute `_total` | ||
that is the total number of matched documents. | ||
## Installing | ||
@@ -23,0 +23,0 @@ |
@@ -84,2 +84,3 @@ /** | ||
es_stream.on('data', function(data) { | ||
expect(es_stream._total).to.equal(20); | ||
current_doc = JSON.parse(data.toString()); | ||
@@ -86,0 +87,0 @@ expect(current_doc.name).to.equal("third chunk name"); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
24381
468