Browse Source

tied query version to specific hash, updated tests

pull/763/head
Stephen Hess 8 years ago
parent
commit
8c896695d1
  1. 2
      package.json
  2. 89
      test/unit/fixture/structured_geocoding/fallback.json

2
package.json

@ -56,7 +56,7 @@
"pelias-labels": "1.5.1", "pelias-labels": "1.5.1",
"pelias-logger": "0.1.0", "pelias-logger": "0.1.0",
"pelias-model": "4.4.0", "pelias-model": "4.4.0",
"pelias-query": "8.11.0", "pelias-query": "pelias/query#b3e2ef7",
"pelias-text-analyzer": "1.7.0", "pelias-text-analyzer": "1.7.0",
"stats-lite": "2.0.3", "stats-lite": "2.0.3",
"through2": "^2.0.3" "through2": "^2.0.3"

89
test/unit/fixture/structured_geocoding/fallback.json

@ -6,6 +6,95 @@
"query": { "query": {
"bool": { "bool": {
"should": [ "should": [
{
"bool": {
"_name": "fallback.venue",
"must": [
{
"multi_match": {
"query": "query value",
"type": "phrase",
"fields": [
"phrase.default"
]
}
},
{
"multi_match": {
"query": "neighbourhood value",
"type": "phrase",
"fields": [
"parent.neighbourhood",
"parent.neighbourhood_a"
]
}
},
{
"multi_match": {
"query": "borough value",
"type": "phrase",
"fields": [
"parent.borough",
"parent.borough_a"
]
}
},
{
"multi_match": {
"query": "city value",
"type": "phrase",
"fields": [
"parent.locality",
"parent.locality_a",
"parent.localadmin",
"parent.localadmin_a"
]
}
},
{
"multi_match": {
"query": "county value",
"type": "phrase",
"fields": [
"parent.county",
"parent.county_a",
"parent.macrocounty",
"parent.macrocounty_a"
]
}
},
{
"multi_match": {
"query": "state value",
"type": "phrase",
"fields": [
"parent.region",
"parent.region_a",
"parent.macroregion",
"parent.macroregion_a"
]
}
},
{
"multi_match": {
"query": "country value",
"type": "phrase",
"fields": [
"parent.country",
"parent.country_a",
"parent.dependency",
"parent.dependency_a"
]
}
}
],
"filter": {
"term": {
"layer": "venue"
}
}
}
},
{ {
"bool": { "bool": {
"_name": "fallback.address", "_name": "fallback.address",

Loading…
Cancel
Save