Comparing version 0.9.9 to 0.9.10
@@ -99,20 +99,9 @@ // Generated by CoffeeScript 1.6.3 | ||
return events.safely(function() { | ||
var countQueryJSON; | ||
countQueryJSON = null; | ||
if (_this.adapter.esVersion.major >= 1 && _this.adapter.esVersion.minor >= 0 && _this.adapter.esVersion.patch >= 1) { | ||
countQueryJSON = { | ||
query: { | ||
terms: { | ||
_id: keys | ||
} | ||
} | ||
}; | ||
} else { | ||
countQueryJSON = { | ||
return _this.adapter.client.count(_this.index, _this.type, { | ||
query: { | ||
terms: { | ||
_id: keys | ||
} | ||
}; | ||
} | ||
return _this.adapter.client.count(_this.index, _this.type, countQueryJSON).on("data", function(data) { | ||
} | ||
}).on("data", function(data) { | ||
var findEvents, jsonData; | ||
@@ -376,16 +365,7 @@ jsonData = JSON.parse(data); | ||
return this.events.source(function(events) { | ||
var countQueryJSON; | ||
countQueryJSON = null; | ||
if (_this.adapter.esVersion.major >= 1 && _this.adapter.esVersion.minor >= 0 && _this.adapter.esVersion.patch >= 1) { | ||
countQueryJSON = { | ||
query: { | ||
match_all: {} | ||
} | ||
}; | ||
} else { | ||
countQueryJSON = { | ||
return _this.adapter.client.count(_this.index, _this.type, { | ||
query: { | ||
match_all: {} | ||
}; | ||
} | ||
return _this.adapter.client.count(_this.index, _this.type, countQueryJSON).on("data", function(data) { | ||
} | ||
}).on("data", function(data) { | ||
var jsonData; | ||
@@ -392,0 +372,0 @@ jsonData = JSON.parse(data); |
{ | ||
"name": "pirate", | ||
"version": "0.9.9", | ||
"version": "0.9.10", | ||
"description": "A simple storage interface with adapters for different storage systems", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
36777
923