Browse Source

update unit test

pull/209/head
Peter Johnson 9 years ago
parent
commit
776b0ce1e1
  1. 28
      test/unit/query/search.js

28
test/unit/query/search.js

@ -656,13 +656,16 @@ module.exports.tests.query = function(test, common) {
'must': [ 'must': [
{ {
'match': { 'match': {
'name.default': '1 water st' 'name.default': {
'query': '1 water st',
'analyzer': 'peliasOneEdgeGram'
}
} }
} }
], ],
'should': [ 'should': [
{ {
match: { 'match': {
'address.number': { 'address.number': {
'query': 1, 'query': 1,
'boost': address_weights.number 'boost': address_weights.number
@ -670,7 +673,7 @@ module.exports.tests.query = function(test, common) {
} }
}, },
{ {
match: { 'match': {
'address.street': { 'address.street': {
'query': 'water st', 'query': 'water st',
'boost': address_weights.street 'boost': address_weights.street
@ -701,23 +704,28 @@ module.exports.tests.query = function(test, common) {
} }
}, },
{ {
match: { 'match': {
local_admin: 'manhattan' 'local_admin': 'manhattan'
} }
}, },
{ {
match: { 'match': {
locality: 'manhattan' 'locality': 'manhattan'
} }
}, },
{ {
match: { 'match': {
neighborhood: 'manhattan' 'neighborhood': 'manhattan'
} }
}, },
{ {
'match': { 'match': {
'phrase.default': '1 water st' 'phrase.default': {
'query': '1 water st',
'analyzer': 'peliasPhrase',
'type': 'phrase',
'slop': 2
}
} }
} }
] ]

Loading…
Cancel
Save