From 776b0ce1e1c9c56ba49a6ec6a6992b8f05252aa4 Mon Sep 17 00:00:00 2001 From: Peter Johnson Date: Fri, 28 Aug 2015 14:43:17 +0200 Subject: [PATCH] update unit test --- test/unit/query/search.js | 28 ++++++++++++++++++---------- 1 file changed, 18 insertions(+), 10 deletions(-) diff --git a/test/unit/query/search.js b/test/unit/query/search.js index fb533ec8..f2e6d9dc 100644 --- a/test/unit/query/search.js +++ b/test/unit/query/search.js @@ -656,13 +656,16 @@ module.exports.tests.query = function(test, common) { 'must': [ { 'match': { - 'name.default': '1 water st' + 'name.default': { + 'query': '1 water st', + 'analyzer': 'peliasOneEdgeGram' + } } } ], 'should': [ { - match: { + 'match': { 'address.number': { 'query': 1, 'boost': address_weights.number @@ -670,7 +673,7 @@ module.exports.tests.query = function(test, common) { } }, { - match: { + 'match': { 'address.street': { 'query': 'water st', 'boost': address_weights.street @@ -701,23 +704,28 @@ module.exports.tests.query = function(test, common) { } }, { - match: { - local_admin: 'manhattan' + 'match': { + 'local_admin': 'manhattan' } }, { - match: { - locality: 'manhattan' + 'match': { + 'locality': 'manhattan' } }, { - match: { - neighborhood: 'manhattan' + 'match': { + 'neighborhood': 'manhattan' } }, { 'match': { - 'phrase.default': '1 water st' + 'phrase.default': { + 'query': '1 water st', + 'analyzer': 'peliasPhrase', + 'type': 'phrase', + 'slop': 2 + } } } ]