Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

elasticsearch-scroll-stream

Package Overview
Dependencies
Maintainers
2
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

elasticsearch-scroll-stream - npm Package Compare versions

Comparing version 1.1.1 to 1.1.2

4

lib/elasticsearch-stream.js

@@ -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");

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc