From d3febe49cce0c4c6b8701111dbfd6420e524081d Mon Sep 17 00:00:00 2001 From: Stephen Hess Date: Mon, 1 Aug 2016 15:42:14 -0400 Subject: [PATCH] moved location of `matched_queries` to correct place --- service/search.js | 2 +- test/unit/mock/backend.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/service/search.js b/service/search.js index fe04d88f..780da2ae 100644 --- a/service/search.js +++ b/service/search.js @@ -35,7 +35,7 @@ function service( backend, cmd, cb ){ hit._source._id = hit._id; hit._source._type = hit._type; hit._source._score = hit._score; - hit._source._matched_queries = hit._matched_queries; + hit._source._matched_queries = hit.matched_queries; return hit._source; }); diff --git a/test/unit/mock/backend.js b/test/unit/mock/backend.js index 7f288246..739ed2cb 100644 --- a/test/unit/mock/backend.js +++ b/test/unit/mock/backend.js @@ -11,7 +11,7 @@ responses['client/search/ok/1'] = function( cmd, cb ){ _id: 'myid1', _type: 'mytype1', _score: 10, - _matched_queries: ['query 1', 'query 2'], + matched_queries: ['query 1', 'query 2'], _source: { value: 1, center_point: { lat: 100.1, lon: -50.5 }, @@ -22,7 +22,7 @@ responses['client/search/ok/1'] = function( cmd, cb ){ _id: 'myid2', _type: 'mytype2', _score: 20, - _matched_queries: ['query 3'], + matched_queries: ['query 3'], _source: { value: 2, center_point: { lat: 100.2, lon: -51.5 },