backbone-db-elasticsearch
Advanced tools
Comparing version 0.1.8 to 0.1.9
@@ -21,2 +21,5 @@ var _ = require('lodash'); | ||
var res = []; | ||
var noScores = _.every(hits, function(hit) { | ||
return !hit._score; | ||
}); | ||
_.each(hits, function(hit, idx) { | ||
@@ -32,3 +35,4 @@ debug('convert', hit); | ||
// (score is missing e.g. when sorting) | ||
doc.score = hit._score || hits.length - idx; | ||
doc.score = hit._score; | ||
if (noScores) doc.score = hits.length - idx; | ||
res.push(doc); | ||
@@ -35,0 +39,0 @@ }); |
{ | ||
"name": "backbone-db-elasticsearch", | ||
"version": "0.1.8", | ||
"version": "0.1.9", | ||
"description": "Elasticsearch driver for backbone-db", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
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
32399
881