Browse Source

moved location of `matched_queries` to correct place

pull/666/head
Stephen Hess 9 years ago
parent
commit
d3febe49cc
  1. 2
      service/search.js
  2. 4
      test/unit/mock/backend.js

2
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;
});

4
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 },

Loading…
Cancel
Save