Skip to content
This repository has been archived by the owner on Mar 31, 2024. It is now read-only.

Commit

Permalink
[courier/segmentedSearch] expose the #mergeResponse method
Browse files Browse the repository at this point in the history
  • Loading branch information
Spencer Alger committed Dec 16, 2014
1 parent 710581b commit c23525a
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ define(function (require) {

self.emit('segment', resp);

mergeResponse(self.mergedResponse, resp);
self.mergeResponse(self.mergedResponse, resp);
req.resp = _.omit(self.mergedResponse, '_bucketIndex');

self.emit('mergedSegment', req.resp);
Expand Down Expand Up @@ -123,7 +123,8 @@ define(function (require) {
return list;
};

var mergeResponse = notify.timed('merge response segment', function (merged, resp) {

SegmentedState.prototype.mergeResponse = notify.timed('merge response segment', function (merged, resp) {
merged.took += resp.took;
merged.hits.total = Math.max(merged.hits.total, resp.hits.total);
merged.hits.max_score = Math.max(merged.hits.max_score, resp.hits.max_score);
Expand Down

0 comments on commit c23525a

Please sign in to comment.