Use mergedSegment for total hits. Closes #3343

This commit is contained in:
Rashid Khan 2015-03-30 08:37:01 -07:00
parent 2065a2a097
commit ff52e8ccf1
2 changed files with 3 additions and 2 deletions

View file

@ -177,7 +177,7 @@ define(function (require) {
this._segments.push(seg);
merged.took += seg.took;
merged.hits.total = Math.max(merged.hits.total, seg.hits.total);
merged.hits.total += seg.hits.total;
merged.hits.max_score = Math.max(merged.hits.max_score, seg.hits.max_score);
[].push.apply(merged.hits.hits, seg.hits.hits);

View file

@ -360,7 +360,6 @@ define(function (require) {
});
}
$scope.hits += resp.hits.total;
var rows = $scope.rows;
var counts = rows.fieldCounts;
@ -407,6 +406,8 @@ define(function (require) {
segmented.on('mergedSegment', function (merged) {
$scope.mergedEsResp = merged;
$scope.hits = merged.hits.total;
});
segmented.on('complete', function () {