diff --git a/query/search.js b/query/search.js index 49945534..cb4deb17 100644 --- a/query/search.js +++ b/query/search.js @@ -100,7 +100,7 @@ function generate( params ){ } // add search condition to distance query - query.query.filtered.query.bool.must.push({ + query.query.filtered.query.bool.must.push({ 'match': { 'name.default': { 'query': input, @@ -117,7 +117,8 @@ function generate( params ){ 'query': input, 'analyzer': 'peliasPhrase', 'type': 'phrase', - 'slop': 2 + 'slop': 2, + 'boost': 2 } } }); diff --git a/test/unit/query/search.js b/test/unit/query/search.js index d3dccce9..5bba7762 100644 --- a/test/unit/query/search.js +++ b/test/unit/query/search.js @@ -92,7 +92,8 @@ var expected = { 'query': 'test', 'analyzer': 'peliasPhrase', 'type': 'phrase', - 'slop': 2 + 'slop': 2, + 'boost': 2 } } }] @@ -182,7 +183,8 @@ module.exports.tests.query = function(test, common) { 'query': 'test', 'analyzer': 'peliasPhrase', 'type': 'phrase', - 'slop': 2 + 'slop': 2, + 'boost': 2 } } }] @@ -230,7 +232,8 @@ module.exports.tests.query = function(test, common) { 'query': 'test', 'analyzer': 'peliasPhrase', 'type': 'phrase', - 'slop': 2 + 'slop': 2, + 'boost': 2 } } }] @@ -323,7 +326,8 @@ module.exports.tests.query = function(test, common) { 'query': '123 main st', 'analyzer': 'peliasPhrase', 'type': 'phrase', - 'slop': 2 + 'slop': 2, + 'boost': 2 } } } @@ -480,7 +484,8 @@ module.exports.tests.query = function(test, common) { 'query': 'soho grand', 'analyzer': 'peliasPhrase', 'type': 'phrase', - 'slop': 2 + 'slop': 2, + 'boost': 2 } } }