pelias-query
Advanced tools
Comparing version 8.15.0 to 8.16.0
@@ -27,3 +27,3 @@ | ||
q.score( query.view.phrase ) | ||
.score( query.view.focus ); | ||
.score( query.view.focus( query.view.phrase ) ); | ||
@@ -53,2 +53,2 @@ // address components | ||
var rendered = q.render( vs ); | ||
console.log( JSON.stringify( rendered, null, 2 ) ); | ||
console.log( JSON.stringify( rendered, null, 2 ) ); |
@@ -20,3 +20,3 @@ | ||
.score( query.view.phrase ) | ||
.score( query.view.focus ); | ||
.score( query.view.focus( query.view.phrase ) ); | ||
@@ -48,2 +48,2 @@ /** | ||
var rendered = q.render( vs ); | ||
console.log( JSON.stringify( rendered, null, 2 ) ); | ||
console.log( JSON.stringify( rendered, null, 2 ) ); |
@@ -5,13 +5,4 @@ module.exports = { | ||
query: { | ||
filtered: { | ||
query: { | ||
bool: { | ||
should: [] | ||
} | ||
}, | ||
filter: { | ||
bool: { | ||
must: [] | ||
} | ||
} | ||
bool: { | ||
should: [] | ||
} | ||
@@ -18,0 +9,0 @@ }, |
@@ -494,3 +494,3 @@ // This query is useful for specifying all the combinations of inputs starting | ||
var funcScoreShould = q.query.function_score.query.filtered.query.bool.should; | ||
var funcScoreShould = q.query.function_score.query.bool.should; | ||
@@ -547,3 +547,10 @@ if (vs.isset('input:query')) { | ||
if( rendered ){ | ||
q.query.function_score.query.filtered.filter.bool.must.push( rendered ); | ||
if( !q.query.function_score.query.bool.hasOwnProperty( 'filter' ) ){ | ||
q.query.function_score.query.bool.filter = { | ||
bool: { | ||
must: [] | ||
} | ||
}; | ||
} | ||
q.query.function_score.query.bool.filter.bool.must.push( rendered ); | ||
} | ||
@@ -550,0 +557,0 @@ }); |
@@ -96,3 +96,3 @@ // This query is useful for querying a value across a number of different | ||
var q = Layout.base( vs ); | ||
var funcScoreShould = q.query.function_score.query.filtered.query.bool.should; | ||
var funcScoreShould = q.query.function_score.query.bool.should; | ||
@@ -128,3 +128,10 @@ var coarse_value = getCoarseValue(vs); | ||
if( rendered ){ | ||
q.query.function_score.query.filtered.filter.bool.must.push( rendered ); | ||
if( !q.query.function_score.query.bool.hasOwnProperty( 'filter' ) ){ | ||
q.query.function_score.query.bool.filter = { | ||
bool: { | ||
must: [] | ||
} | ||
}; | ||
} | ||
q.query.function_score.query.bool.filter.bool.must.push( rendered ); | ||
} | ||
@@ -131,0 +138,0 @@ }); |
@@ -467,3 +467,3 @@ // This query is used for component geocodes, where the individual fields have | ||
var funcScoreShould = q.query.function_score.query.filtered.query.bool.should; | ||
var funcScoreShould = q.query.function_score.query.bool.should; | ||
@@ -523,3 +523,10 @@ if (vs.isset('input:query')) { | ||
if( rendered ){ | ||
q.query.function_score.query.filtered.filter.bool.must.push( rendered ); | ||
if( !q.query.function_score.query.bool.hasOwnProperty( 'filter' ) ){ | ||
q.query.function_score.query.bool.filter = { | ||
bool: { | ||
must: [] | ||
} | ||
}; | ||
} | ||
q.query.function_score.query.bool.filter.bool.must.push( rendered ); | ||
} | ||
@@ -526,0 +533,0 @@ }); |
{ | ||
"name": "pelias-query", | ||
"version": "8.15.0", | ||
"version": "8.16.0", | ||
"description": "An Elasticsearch query builder for Pelias", | ||
@@ -5,0 +5,0 @@ "engines": { |
108
README.md
@@ -339,24 +339,16 @@ >This repository is part of the [Pelias](https://github.com/pelias/pelias) | ||
"query": { | ||
"filtered": { | ||
"query": { | ||
"bool": {} | ||
}, | ||
"filter": { | ||
"bool": { | ||
"should": [ | ||
{ | ||
"geo_distance": { | ||
"distance": "5km", | ||
"distance_type": "plane", | ||
"optimize_bbox": "indexed", | ||
"_cache": true, | ||
"center_point": { | ||
"lat": 51.5, | ||
"lon": -0.06 | ||
} | ||
} | ||
"bool": { | ||
"filter": [ | ||
{ | ||
"geo_distance": { | ||
"distance": "5km", | ||
"distance_type": "plane", | ||
"optimize_bbox": "indexed", | ||
"center_point": { | ||
"lat": 51.5, | ||
"lon": -0.06 | ||
} | ||
] | ||
} | ||
} | ||
} | ||
] | ||
} | ||
@@ -406,3 +398,3 @@ }, | ||
.score( query.view.phrase ) | ||
.score( query.view.focus ); | ||
.score( query.view.focus(query.view.phrase) ); | ||
@@ -441,7 +433,18 @@ /** | ||
"query": { | ||
"filtered": { | ||
"query": { | ||
"bool": { | ||
"should": [ | ||
{ | ||
"bool": { | ||
"should": [ | ||
{ | ||
"match": { | ||
"phrase.default": { | ||
"analyzer": "standard", | ||
"type": "phrase", | ||
"boost": 1, | ||
"slop": 2, | ||
"query": "union square" | ||
} | ||
} | ||
}, | ||
{ | ||
"function_score": { | ||
"query": { | ||
"match": { | ||
@@ -457,40 +460,23 @@ "phrase.default": { | ||
}, | ||
{ | ||
"function_score": { | ||
"query": { | ||
"match": { | ||
"phrase.default": { | ||
"analyzer": "standard", | ||
"type": "phrase", | ||
"boost": 1, | ||
"slop": 2, | ||
"query": "union square" | ||
} | ||
"functions": [ | ||
{ | ||
"weight": 2, | ||
"gauss": { | ||
"center_point": { | ||
"origin": { | ||
"lat": 51.5, | ||
"lon": -0.06 | ||
}, | ||
"offset": "10km", | ||
"scale": "100km", | ||
"decay": 0.4 | ||
} | ||
}, | ||
"functions": [ | ||
{ | ||
"gauss": { | ||
"center_point": { | ||
"origin": { | ||
"lat": 51.5, | ||
"lon": -0.06 | ||
}, | ||
"offset": "10km", | ||
"scale": "100km", | ||
"decay": 0.4 | ||
} | ||
} | ||
} | ||
], | ||
"score_mode": "avg", | ||
"boost_mode": "replace" | ||
} | ||
} | ||
} | ||
] | ||
], | ||
"score_mode": "avg", | ||
"boost_mode": "replace" | ||
} | ||
} | ||
}, | ||
"filter": { | ||
"bool": {} | ||
} | ||
] | ||
} | ||
@@ -497,0 +483,0 @@ }, |
@@ -5,88 +5,79 @@ { | ||
"query": { | ||
"filtered": { | ||
"query": { | ||
"bool": { | ||
"should": [ | ||
{ | ||
"bool": { | ||
"_name": "fallback.address", | ||
"boost": { "$": 19 }, | ||
"must": [ | ||
{ | ||
"match_phrase": { | ||
"address_parts.number": "house number value" | ||
} | ||
}, | ||
{ | ||
"match_phrase": { | ||
"address_parts.street": "street value" | ||
} | ||
} | ||
], | ||
"should": [ | ||
{ | ||
"match_phrase": { | ||
"address_parts.zip": "postcode value" | ||
} | ||
} | ||
], | ||
"filter": { | ||
"term": { | ||
"layer": "address" | ||
} | ||
"bool": { | ||
"should": [ | ||
{ | ||
"bool": { | ||
"_name": "fallback.address", | ||
"boost": { "$": 19 }, | ||
"must": [ | ||
{ | ||
"match_phrase": { | ||
"address_parts.number": "house number value" | ||
} | ||
}, | ||
{ | ||
"match_phrase": { | ||
"address_parts.street": "street value" | ||
} | ||
} | ||
}, | ||
{ | ||
"bool": { | ||
"_name": "fallback.postalcode", | ||
"must": [ | ||
{ | ||
"multi_match": { | ||
"query": "postcode value", | ||
"type": "phrase", | ||
"fields": ["parent.postalcode"] | ||
} | ||
} | ||
], | ||
"filter": { | ||
"term": { | ||
"layer": "postalcode" | ||
} | ||
], | ||
"should": [ | ||
{ | ||
"match_phrase": { | ||
"address_parts.zip": "postcode value" | ||
} | ||
} | ||
}, | ||
{ | ||
"bool": { | ||
"_name": "fallback.street", | ||
"boost": { "$": 17 }, | ||
"must": [ | ||
{ | ||
"match_phrase": { | ||
"address_parts.street": "street value" | ||
} | ||
} | ||
], | ||
"should": [ | ||
{ | ||
"match_phrase": { | ||
"address_parts.zip": "postcode value" | ||
} | ||
} | ||
], | ||
"filter": { | ||
"term": { | ||
"layer": "street" | ||
} | ||
], | ||
"filter": { | ||
"term": { | ||
"layer": "address" | ||
} | ||
} | ||
} | ||
}, | ||
{ | ||
"bool": { | ||
"_name": "fallback.postalcode", | ||
"must": [ | ||
{ | ||
"multi_match": { | ||
"query": "postcode value", | ||
"type": "phrase", | ||
"fields": ["parent.postalcode"] | ||
} | ||
} | ||
], | ||
"filter": { | ||
"term": { | ||
"layer": "postalcode" | ||
} | ||
} | ||
] | ||
} | ||
}, | ||
{ | ||
"bool": { | ||
"_name": "fallback.street", | ||
"boost": { "$": 17 }, | ||
"must": [ | ||
{ | ||
"match_phrase": { | ||
"address_parts.street": "street value" | ||
} | ||
} | ||
], | ||
"should": [ | ||
{ | ||
"match_phrase": { | ||
"address_parts.zip": "postcode value" | ||
} | ||
} | ||
], | ||
"filter": { | ||
"term": { | ||
"layer": "street" | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
"filter": { | ||
"bool": { | ||
"must": [] | ||
} | ||
} | ||
] | ||
} | ||
@@ -93,0 +84,0 @@ }, |
@@ -5,33 +5,24 @@ { | ||
"query": { | ||
"filtered": { | ||
"query": { | ||
"bool": { | ||
"should": [ | ||
{ | ||
"bool": { | ||
"_name": "fallback.neighbourhood", | ||
"must": [ | ||
{ | ||
"multi_match": { | ||
"query": "neighbourhood value", | ||
"type": "phrase", | ||
"fields": ["parent.neighbourhood", "parent.neighbourhood_a"] | ||
} | ||
} | ||
], | ||
"filter": { | ||
"term": { | ||
"layer": "neighbourhood" | ||
} | ||
"bool": { | ||
"should": [ | ||
{ | ||
"bool": { | ||
"_name": "fallback.neighbourhood", | ||
"must": [ | ||
{ | ||
"multi_match": { | ||
"query": "neighbourhood value", | ||
"type": "phrase", | ||
"fields": ["parent.neighbourhood", "parent.neighbourhood_a"] | ||
} | ||
} | ||
], | ||
"filter": { | ||
"term": { | ||
"layer": "neighbourhood" | ||
} | ||
} | ||
] | ||
} | ||
} | ||
}, | ||
"filter": { | ||
"bool": { | ||
"must": [] | ||
} | ||
} | ||
] | ||
} | ||
@@ -38,0 +29,0 @@ }, |
@@ -5,13 +5,4 @@ { | ||
"query": { | ||
"filtered": { | ||
"query": { | ||
"bool": { | ||
"should": [] | ||
} | ||
}, | ||
"filter": { | ||
"bool": { | ||
"must": [] | ||
} | ||
} | ||
"bool": { | ||
"should": [] | ||
} | ||
@@ -18,0 +9,0 @@ }, |
@@ -5,752 +5,743 @@ { | ||
"query": { | ||
"filtered": { | ||
"query": { | ||
"bool": { | ||
"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": "locality 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": "region 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": { | ||
"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": "locality 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": "region 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" | ||
] | ||
} | ||
} | ||
}, | ||
{ | ||
"bool": { | ||
"_name": "fallback.address", | ||
"boost": { "$": 19 }, | ||
"must": [ | ||
{ | ||
"match_phrase": { | ||
"address_parts.number": "house number value" | ||
} | ||
}, | ||
{ | ||
"match_phrase": { | ||
"address_parts.street": "street value" | ||
} | ||
}, | ||
{ | ||
"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": "locality 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": "region 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" | ||
] | ||
} | ||
} | ||
], | ||
"should": [], | ||
"filter": { | ||
"term": { | ||
"layer": "address" | ||
} | ||
], | ||
"filter": { | ||
"term": { | ||
"layer": "venue" | ||
} | ||
} | ||
} | ||
}, | ||
{ | ||
"bool": { | ||
"_name": "fallback.address", | ||
"boost": { "$": 19 }, | ||
"must": [ | ||
{ | ||
"match_phrase": { | ||
"address_parts.number": "house number value" | ||
} | ||
}, | ||
{ | ||
"match_phrase": { | ||
"address_parts.street": "street value" | ||
} | ||
}, | ||
{ | ||
"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": "locality 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": "region 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" | ||
] | ||
} | ||
} | ||
}, | ||
{ | ||
"bool": { | ||
"_name": "fallback.street", | ||
"boost": { "$": 17 }, | ||
"must": [ | ||
{ | ||
"match_phrase": { | ||
"address_parts.street": "street value" | ||
} | ||
}, | ||
{ | ||
"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": "locality 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": "region 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" | ||
] | ||
} | ||
} | ||
], | ||
"should": [], | ||
"filter": { | ||
"term": { | ||
"layer": "street" | ||
} | ||
], | ||
"should": [], | ||
"filter": { | ||
"term": { | ||
"layer": "address" | ||
} | ||
} | ||
} | ||
}, | ||
{ | ||
"bool": { | ||
"_name": "fallback.street", | ||
"boost": { "$": 17 }, | ||
"must": [ | ||
{ | ||
"match_phrase": { | ||
"address_parts.street": "street value" | ||
} | ||
}, | ||
{ | ||
"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": "locality 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": "region 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" | ||
] | ||
} | ||
} | ||
}, | ||
{ | ||
"bool": { | ||
"_name": "fallback.neighbourhood", | ||
"must": [ | ||
{ | ||
"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": "locality 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": "region 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": "neighbourhood" | ||
} | ||
], | ||
"should": [], | ||
"filter": { | ||
"term": { | ||
"layer": "street" | ||
} | ||
} | ||
} | ||
}, | ||
{ | ||
"bool": { | ||
"_name": "fallback.neighbourhood", | ||
"must": [ | ||
{ | ||
"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": "locality 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": "region 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" | ||
] | ||
} | ||
} | ||
}, | ||
{ | ||
"bool": { | ||
"_name": "fallback.borough", | ||
"must": [ | ||
{ | ||
"multi_match": { | ||
"query": "borough value", | ||
"type": "phrase", | ||
"fields": [ | ||
"parent.borough", | ||
"parent.borough_a" | ||
] | ||
} | ||
}, | ||
{ | ||
"multi_match": { | ||
"query": "locality 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": "region 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": "borough" | ||
} | ||
], | ||
"filter": { | ||
"term": { | ||
"layer": "neighbourhood" | ||
} | ||
} | ||
} | ||
}, | ||
{ | ||
"bool": { | ||
"_name": "fallback.borough", | ||
"must": [ | ||
{ | ||
"multi_match": { | ||
"query": "borough value", | ||
"type": "phrase", | ||
"fields": [ | ||
"parent.borough", | ||
"parent.borough_a" | ||
] | ||
} | ||
}, | ||
{ | ||
"multi_match": { | ||
"query": "locality 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": "region 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" | ||
] | ||
} | ||
} | ||
}, | ||
{ | ||
"bool": { | ||
"_name": "fallback.locality", | ||
"must": [ | ||
{ | ||
"multi_match": { | ||
"query": "locality value", | ||
"type": "phrase", | ||
"fields": [ | ||
"parent.locality", | ||
"parent.locality_a" | ||
] | ||
} | ||
}, | ||
{ | ||
"multi_match": { | ||
"query": "county value", | ||
"type": "phrase", | ||
"fields": [ | ||
"parent.county", | ||
"parent.county_a", | ||
"parent.macrocounty", | ||
"parent.macrocounty_a" | ||
] | ||
} | ||
}, | ||
{ | ||
"multi_match": { | ||
"query": "region 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": "locality" | ||
} | ||
], | ||
"filter": { | ||
"term": { | ||
"layer": "borough" | ||
} | ||
} | ||
} | ||
}, | ||
{ | ||
"bool": { | ||
"_name": "fallback.locality", | ||
"must": [ | ||
{ | ||
"multi_match": { | ||
"query": "locality value", | ||
"type": "phrase", | ||
"fields": [ | ||
"parent.locality", | ||
"parent.locality_a" | ||
] | ||
} | ||
}, | ||
{ | ||
"multi_match": { | ||
"query": "county value", | ||
"type": "phrase", | ||
"fields": [ | ||
"parent.county", | ||
"parent.county_a", | ||
"parent.macrocounty", | ||
"parent.macrocounty_a" | ||
] | ||
} | ||
}, | ||
{ | ||
"multi_match": { | ||
"query": "region 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" | ||
] | ||
} | ||
} | ||
}, | ||
{ | ||
"bool": { | ||
"_name": "fallback.localadmin", | ||
"must": [ | ||
{ | ||
"multi_match": { | ||
"query": "locality value", | ||
"type": "phrase", | ||
"fields": [ | ||
"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": "region 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": "localadmin" | ||
} | ||
], | ||
"filter": { | ||
"term": { | ||
"layer": "locality" | ||
} | ||
} | ||
} | ||
}, | ||
{ | ||
"bool": { | ||
"_name": "fallback.localadmin", | ||
"must": [ | ||
{ | ||
"multi_match": { | ||
"query": "locality value", | ||
"type": "phrase", | ||
"fields": [ | ||
"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": "region 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" | ||
] | ||
} | ||
} | ||
}, | ||
{ | ||
"bool": { | ||
"_name": "fallback.county", | ||
"must": [ | ||
{ | ||
"multi_match": { | ||
"query": "county value", | ||
"type": "phrase", | ||
"fields": [ | ||
"parent.county", | ||
"parent.county_a" | ||
] | ||
} | ||
}, | ||
{ | ||
"multi_match": { | ||
"query": "region 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": "county" | ||
} | ||
], | ||
"filter": { | ||
"term": { | ||
"layer": "localadmin" | ||
} | ||
} | ||
} | ||
}, | ||
{ | ||
"bool": { | ||
"_name": "fallback.county", | ||
"must": [ | ||
{ | ||
"multi_match": { | ||
"query": "county value", | ||
"type": "phrase", | ||
"fields": [ | ||
"parent.county", | ||
"parent.county_a" | ||
] | ||
} | ||
}, | ||
{ | ||
"multi_match": { | ||
"query": "region 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" | ||
] | ||
} | ||
} | ||
}, | ||
{ | ||
"bool": { | ||
"_name": "fallback.macrocounty", | ||
"must": [ | ||
{ | ||
"multi_match": { | ||
"query": "county value", | ||
"type": "phrase", | ||
"fields": [ | ||
"parent.macrocounty", | ||
"parent.macrocounty_a" | ||
] | ||
} | ||
}, | ||
{ | ||
"multi_match": { | ||
"query": "region 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": "macrocounty" | ||
} | ||
], | ||
"filter": { | ||
"term": { | ||
"layer": "county" | ||
} | ||
} | ||
} | ||
}, | ||
{ | ||
"bool": { | ||
"_name": "fallback.macrocounty", | ||
"must": [ | ||
{ | ||
"multi_match": { | ||
"query": "county value", | ||
"type": "phrase", | ||
"fields": [ | ||
"parent.macrocounty", | ||
"parent.macrocounty_a" | ||
] | ||
} | ||
}, | ||
{ | ||
"multi_match": { | ||
"query": "region 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" | ||
] | ||
} | ||
} | ||
}, | ||
{ | ||
"bool": { | ||
"_name": "fallback.region", | ||
"must": [ | ||
{ | ||
"multi_match": { | ||
"query": "region value", | ||
"type": "phrase", | ||
"fields": [ | ||
"parent.region", | ||
"parent.region_a" | ||
] | ||
} | ||
}, | ||
{ | ||
"multi_match": { | ||
"query": "country value", | ||
"type": "phrase", | ||
"fields": [ | ||
"parent.country", | ||
"parent.country_a", | ||
"parent.dependency", | ||
"parent.dependency_a" | ||
] | ||
} | ||
} | ||
], | ||
"filter": { | ||
"term": { | ||
"layer": "region" | ||
} | ||
], | ||
"filter": { | ||
"term": { | ||
"layer": "macrocounty" | ||
} | ||
} | ||
} | ||
}, | ||
{ | ||
"bool": { | ||
"_name": "fallback.region", | ||
"must": [ | ||
{ | ||
"multi_match": { | ||
"query": "region value", | ||
"type": "phrase", | ||
"fields": [ | ||
"parent.region", | ||
"parent.region_a" | ||
] | ||
} | ||
}, | ||
{ | ||
"multi_match": { | ||
"query": "country value", | ||
"type": "phrase", | ||
"fields": [ | ||
"parent.country", | ||
"parent.country_a", | ||
"parent.dependency", | ||
"parent.dependency_a" | ||
] | ||
} | ||
} | ||
}, | ||
{ | ||
"bool": { | ||
"_name": "fallback.macroregion", | ||
"must": [ | ||
{ | ||
"multi_match": { | ||
"query": "region value", | ||
"type": "phrase", | ||
"fields": [ | ||
"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": "macroregion" | ||
} | ||
], | ||
"filter": { | ||
"term": { | ||
"layer": "region" | ||
} | ||
} | ||
} | ||
}, | ||
{ | ||
"bool": { | ||
"_name": "fallback.macroregion", | ||
"must": [ | ||
{ | ||
"multi_match": { | ||
"query": "region value", | ||
"type": "phrase", | ||
"fields": [ | ||
"parent.macroregion", | ||
"parent.macroregion_a" | ||
] | ||
} | ||
}, | ||
{ | ||
"multi_match": { | ||
"query": "country value", | ||
"type": "phrase", | ||
"fields": [ | ||
"parent.country", | ||
"parent.country_a", | ||
"parent.dependency", | ||
"parent.dependency_a" | ||
] | ||
} | ||
} | ||
}, | ||
{ | ||
"bool": { | ||
"_name": "fallback.dependency", | ||
"must": [ | ||
{ | ||
"multi_match": { | ||
"query": "country value", | ||
"type": "phrase", | ||
"fields": [ | ||
"parent.dependency", | ||
"parent.dependency_a" | ||
] | ||
} | ||
} | ||
], | ||
"filter": { | ||
"term": { | ||
"layer": "dependency" | ||
} | ||
], | ||
"filter": { | ||
"term": { | ||
"layer": "macroregion" | ||
} | ||
} | ||
} | ||
}, | ||
{ | ||
"bool": { | ||
"_name": "fallback.dependency", | ||
"must": [ | ||
{ | ||
"multi_match": { | ||
"query": "country value", | ||
"type": "phrase", | ||
"fields": [ | ||
"parent.dependency", | ||
"parent.dependency_a" | ||
] | ||
} | ||
} | ||
}, | ||
{ | ||
"bool": { | ||
"_name": "fallback.country", | ||
"must": [ | ||
{ | ||
"multi_match": { | ||
"query": "country value", | ||
"type": "phrase", | ||
"fields": [ | ||
"parent.country", | ||
"parent.country_a" | ||
] | ||
} | ||
} | ||
], | ||
"filter": { | ||
"term": { | ||
"layer": "country" | ||
} | ||
], | ||
"filter": { | ||
"term": { | ||
"layer": "dependency" | ||
} | ||
} | ||
} | ||
}, | ||
{ | ||
"bool": { | ||
"_name": "fallback.country", | ||
"must": [ | ||
{ | ||
"multi_match": { | ||
"query": "country value", | ||
"type": "phrase", | ||
"fields": [ | ||
"parent.country", | ||
"parent.country_a" | ||
] | ||
} | ||
} | ||
], | ||
"filter": { | ||
"term": { | ||
"layer": "country" | ||
} | ||
} | ||
] | ||
} | ||
} | ||
}, | ||
"filter": { | ||
"bool": { | ||
"must": [] | ||
} | ||
} | ||
] | ||
} | ||
@@ -757,0 +748,0 @@ }, |
@@ -5,663 +5,654 @@ { | ||
"query": { | ||
"filtered": { | ||
"query": { | ||
"bool": { | ||
"should": [ | ||
{ | ||
"bool": { | ||
"_name": "fallback.address", | ||
"boost": { "$": 19 }, | ||
"must": [ | ||
{ | ||
"match_phrase": { | ||
"address_parts.number": "house number value" | ||
} | ||
}, | ||
{ | ||
"match_phrase": { | ||
"address_parts.street": "street value" | ||
} | ||
}, | ||
{ | ||
"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": "locality 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": "region 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" | ||
] | ||
} | ||
} | ||
], | ||
"should": [], | ||
"filter": { | ||
"term": { | ||
"layer": "address" | ||
} | ||
"bool": { | ||
"should": [ | ||
{ | ||
"bool": { | ||
"_name": "fallback.address", | ||
"boost": { "$": 19 }, | ||
"must": [ | ||
{ | ||
"match_phrase": { | ||
"address_parts.number": "house number value" | ||
} | ||
}, | ||
{ | ||
"match_phrase": { | ||
"address_parts.street": "street value" | ||
} | ||
}, | ||
{ | ||
"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": "locality 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": "region 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" | ||
] | ||
} | ||
} | ||
}, | ||
{ | ||
"bool": { | ||
"_name": "fallback.street", | ||
"boost": { "$": 17 }, | ||
"must": [ | ||
{ | ||
"match_phrase": { | ||
"address_parts.street": "street value" | ||
} | ||
}, | ||
{ | ||
"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": "locality 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": "region 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" | ||
] | ||
} | ||
} | ||
], | ||
"should": [], | ||
"filter": { | ||
"term": { | ||
"layer": "street" | ||
} | ||
], | ||
"should": [], | ||
"filter": { | ||
"term": { | ||
"layer": "address" | ||
} | ||
} | ||
} | ||
}, | ||
{ | ||
"bool": { | ||
"_name": "fallback.street", | ||
"boost": { "$": 17 }, | ||
"must": [ | ||
{ | ||
"match_phrase": { | ||
"address_parts.street": "street value" | ||
} | ||
}, | ||
{ | ||
"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": "locality 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": "region 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" | ||
] | ||
} | ||
} | ||
}, | ||
{ | ||
"bool": { | ||
"_name": "fallback.neighbourhood", | ||
"must": [ | ||
{ | ||
"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": "locality 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": "region 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": "neighbourhood" | ||
} | ||
], | ||
"should": [], | ||
"filter": { | ||
"term": { | ||
"layer": "street" | ||
} | ||
} | ||
} | ||
}, | ||
{ | ||
"bool": { | ||
"_name": "fallback.neighbourhood", | ||
"must": [ | ||
{ | ||
"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": "locality 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": "region 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" | ||
] | ||
} | ||
} | ||
}, | ||
{ | ||
"bool": { | ||
"_name": "fallback.borough", | ||
"must": [ | ||
{ | ||
"multi_match": { | ||
"query": "borough value", | ||
"type": "phrase", | ||
"fields": [ | ||
"parent.borough", | ||
"parent.borough_a" | ||
] | ||
} | ||
}, | ||
{ | ||
"multi_match": { | ||
"query": "locality 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": "region 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": "borough" | ||
} | ||
], | ||
"filter": { | ||
"term": { | ||
"layer": "neighbourhood" | ||
} | ||
} | ||
} | ||
}, | ||
{ | ||
"bool": { | ||
"_name": "fallback.borough", | ||
"must": [ | ||
{ | ||
"multi_match": { | ||
"query": "borough value", | ||
"type": "phrase", | ||
"fields": [ | ||
"parent.borough", | ||
"parent.borough_a" | ||
] | ||
} | ||
}, | ||
{ | ||
"multi_match": { | ||
"query": "locality 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": "region 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" | ||
] | ||
} | ||
} | ||
}, | ||
{ | ||
"bool": { | ||
"_name": "fallback.locality", | ||
"must": [ | ||
{ | ||
"multi_match": { | ||
"query": "locality value", | ||
"type": "phrase", | ||
"fields": [ | ||
"parent.locality", | ||
"parent.locality_a" | ||
] | ||
} | ||
}, | ||
{ | ||
"multi_match": { | ||
"query": "county value", | ||
"type": "phrase", | ||
"fields": [ | ||
"parent.county", | ||
"parent.county_a", | ||
"parent.macrocounty", | ||
"parent.macrocounty_a" | ||
] | ||
} | ||
}, | ||
{ | ||
"multi_match": { | ||
"query": "region 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": "locality" | ||
} | ||
], | ||
"filter": { | ||
"term": { | ||
"layer": "borough" | ||
} | ||
} | ||
} | ||
}, | ||
{ | ||
"bool": { | ||
"_name": "fallback.locality", | ||
"must": [ | ||
{ | ||
"multi_match": { | ||
"query": "locality value", | ||
"type": "phrase", | ||
"fields": [ | ||
"parent.locality", | ||
"parent.locality_a" | ||
] | ||
} | ||
}, | ||
{ | ||
"multi_match": { | ||
"query": "county value", | ||
"type": "phrase", | ||
"fields": [ | ||
"parent.county", | ||
"parent.county_a", | ||
"parent.macrocounty", | ||
"parent.macrocounty_a" | ||
] | ||
} | ||
}, | ||
{ | ||
"multi_match": { | ||
"query": "region 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" | ||
] | ||
} | ||
} | ||
}, | ||
{ | ||
"bool": { | ||
"_name": "fallback.localadmin", | ||
"must": [ | ||
{ | ||
"multi_match": { | ||
"query": "locality value", | ||
"type": "phrase", | ||
"fields": [ | ||
"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": "region 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": "localadmin" | ||
} | ||
], | ||
"filter": { | ||
"term": { | ||
"layer": "locality" | ||
} | ||
} | ||
} | ||
}, | ||
{ | ||
"bool": { | ||
"_name": "fallback.localadmin", | ||
"must": [ | ||
{ | ||
"multi_match": { | ||
"query": "locality value", | ||
"type": "phrase", | ||
"fields": [ | ||
"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": "region 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" | ||
] | ||
} | ||
} | ||
}, | ||
{ | ||
"bool": { | ||
"_name": "fallback.county", | ||
"must": [ | ||
{ | ||
"multi_match": { | ||
"query": "county value", | ||
"type": "phrase", | ||
"fields": [ | ||
"parent.county", | ||
"parent.county_a" | ||
] | ||
} | ||
}, | ||
{ | ||
"multi_match": { | ||
"query": "region 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": "county" | ||
} | ||
], | ||
"filter": { | ||
"term": { | ||
"layer": "localadmin" | ||
} | ||
} | ||
} | ||
}, | ||
{ | ||
"bool": { | ||
"_name": "fallback.county", | ||
"must": [ | ||
{ | ||
"multi_match": { | ||
"query": "county value", | ||
"type": "phrase", | ||
"fields": [ | ||
"parent.county", | ||
"parent.county_a" | ||
] | ||
} | ||
}, | ||
{ | ||
"multi_match": { | ||
"query": "region 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" | ||
] | ||
} | ||
} | ||
}, | ||
{ | ||
"bool": { | ||
"_name": "fallback.macrocounty", | ||
"must": [ | ||
{ | ||
"multi_match": { | ||
"query": "county value", | ||
"type": "phrase", | ||
"fields": [ | ||
"parent.macrocounty", | ||
"parent.macrocounty_a" | ||
] | ||
} | ||
}, | ||
{ | ||
"multi_match": { | ||
"query": "region 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": "macrocounty" | ||
} | ||
], | ||
"filter": { | ||
"term": { | ||
"layer": "county" | ||
} | ||
} | ||
} | ||
}, | ||
{ | ||
"bool": { | ||
"_name": "fallback.macrocounty", | ||
"must": [ | ||
{ | ||
"multi_match": { | ||
"query": "county value", | ||
"type": "phrase", | ||
"fields": [ | ||
"parent.macrocounty", | ||
"parent.macrocounty_a" | ||
] | ||
} | ||
}, | ||
{ | ||
"multi_match": { | ||
"query": "region 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" | ||
] | ||
} | ||
} | ||
}, | ||
{ | ||
"bool": { | ||
"_name": "fallback.region", | ||
"must": [ | ||
{ | ||
"multi_match": { | ||
"query": "region value", | ||
"type": "phrase", | ||
"fields": [ | ||
"parent.region", | ||
"parent.region_a" | ||
] | ||
} | ||
}, | ||
{ | ||
"multi_match": { | ||
"query": "country value", | ||
"type": "phrase", | ||
"fields": [ | ||
"parent.country", | ||
"parent.country_a", | ||
"parent.dependency", | ||
"parent.dependency_a" | ||
] | ||
} | ||
} | ||
], | ||
"filter": { | ||
"term": { | ||
"layer": "region" | ||
} | ||
], | ||
"filter": { | ||
"term": { | ||
"layer": "macrocounty" | ||
} | ||
} | ||
} | ||
}, | ||
{ | ||
"bool": { | ||
"_name": "fallback.region", | ||
"must": [ | ||
{ | ||
"multi_match": { | ||
"query": "region value", | ||
"type": "phrase", | ||
"fields": [ | ||
"parent.region", | ||
"parent.region_a" | ||
] | ||
} | ||
}, | ||
{ | ||
"multi_match": { | ||
"query": "country value", | ||
"type": "phrase", | ||
"fields": [ | ||
"parent.country", | ||
"parent.country_a", | ||
"parent.dependency", | ||
"parent.dependency_a" | ||
] | ||
} | ||
} | ||
}, | ||
{ | ||
"bool": { | ||
"_name": "fallback.macroregion", | ||
"must": [ | ||
{ | ||
"multi_match": { | ||
"query": "region value", | ||
"type": "phrase", | ||
"fields": [ | ||
"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": "macroregion" | ||
} | ||
], | ||
"filter": { | ||
"term": { | ||
"layer": "region" | ||
} | ||
} | ||
} | ||
}, | ||
{ | ||
"bool": { | ||
"_name": "fallback.macroregion", | ||
"must": [ | ||
{ | ||
"multi_match": { | ||
"query": "region value", | ||
"type": "phrase", | ||
"fields": [ | ||
"parent.macroregion", | ||
"parent.macroregion_a" | ||
] | ||
} | ||
}, | ||
{ | ||
"multi_match": { | ||
"query": "country value", | ||
"type": "phrase", | ||
"fields": [ | ||
"parent.country", | ||
"parent.country_a", | ||
"parent.dependency", | ||
"parent.dependency_a" | ||
] | ||
} | ||
} | ||
}, | ||
{ | ||
"bool": { | ||
"_name": "fallback.dependency", | ||
"must": [ | ||
{ | ||
"multi_match": { | ||
"query": "country value", | ||
"type": "phrase", | ||
"fields": [ | ||
"parent.dependency", | ||
"parent.dependency_a" | ||
] | ||
} | ||
} | ||
], | ||
"filter": { | ||
"term": { | ||
"layer": "dependency" | ||
} | ||
], | ||
"filter": { | ||
"term": { | ||
"layer": "macroregion" | ||
} | ||
} | ||
} | ||
}, | ||
{ | ||
"bool": { | ||
"_name": "fallback.dependency", | ||
"must": [ | ||
{ | ||
"multi_match": { | ||
"query": "country value", | ||
"type": "phrase", | ||
"fields": [ | ||
"parent.dependency", | ||
"parent.dependency_a" | ||
] | ||
} | ||
} | ||
}, | ||
{ | ||
"bool": { | ||
"_name": "fallback.country", | ||
"must": [ | ||
{ | ||
"multi_match": { | ||
"query": "country value", | ||
"type": "phrase", | ||
"fields": [ | ||
"parent.country", | ||
"parent.country_a" | ||
] | ||
} | ||
} | ||
], | ||
"filter": { | ||
"term": { | ||
"layer": "country" | ||
} | ||
], | ||
"filter": { | ||
"term": { | ||
"layer": "dependency" | ||
} | ||
} | ||
} | ||
}, | ||
{ | ||
"bool": { | ||
"_name": "fallback.country", | ||
"must": [ | ||
{ | ||
"multi_match": { | ||
"query": "country value", | ||
"type": "phrase", | ||
"fields": [ | ||
"parent.country", | ||
"parent.country_a" | ||
] | ||
} | ||
} | ||
], | ||
"filter": { | ||
"term": { | ||
"layer": "country" | ||
} | ||
} | ||
] | ||
} | ||
} | ||
}, | ||
"filter": { | ||
"bool": { | ||
"must": [] | ||
} | ||
} | ||
] | ||
} | ||
@@ -668,0 +659,0 @@ }, |
@@ -5,88 +5,79 @@ { | ||
"query": { | ||
"filtered": { | ||
"query": { | ||
"bool": { | ||
"should": [ | ||
{ | ||
"bool": { | ||
"_name": "fallback.address", | ||
"boost": { "$": 19 }, | ||
"must": [ | ||
{ | ||
"match_phrase": { | ||
"address_parts.number": "house number value" | ||
} | ||
}, | ||
{ | ||
"match_phrase": { | ||
"address_parts.street": "street value" | ||
} | ||
} | ||
], | ||
"should": [ | ||
{ | ||
"match_phrase": { | ||
"address_parts.zip": "postcode value" | ||
} | ||
} | ||
], | ||
"filter": { | ||
"term": { | ||
"layer": "address" | ||
} | ||
"bool": { | ||
"should": [ | ||
{ | ||
"bool": { | ||
"_name": "fallback.address", | ||
"boost": { "$": 19 }, | ||
"must": [ | ||
{ | ||
"match_phrase": { | ||
"address_parts.number": "house number value" | ||
} | ||
}, | ||
{ | ||
"match_phrase": { | ||
"address_parts.street": "street value" | ||
} | ||
} | ||
}, | ||
{ | ||
"bool": { | ||
"_name": "fallback.street", | ||
"boost": { "$": 17 }, | ||
"must": [ | ||
{ | ||
"match_phrase": { | ||
"address_parts.street": "street value" | ||
} | ||
} | ||
], | ||
"should": [ | ||
{ | ||
"match_phrase": { | ||
"address_parts.zip": "postcode value" | ||
} | ||
} | ||
], | ||
"filter": { | ||
"term": { | ||
"layer": "street" | ||
} | ||
], | ||
"should": [ | ||
{ | ||
"match_phrase": { | ||
"address_parts.zip": "postcode value" | ||
} | ||
} | ||
}, | ||
{ | ||
"bool": { | ||
"_name": "fallback.postalcode", | ||
"must": [ | ||
{ | ||
"multi_match": { | ||
"query": "postcode value", | ||
"type": "phrase", | ||
"fields": ["parent.postalcode"] | ||
} | ||
} | ||
], | ||
"filter": { | ||
"term": { | ||
"layer": "postalcode" | ||
} | ||
], | ||
"filter": { | ||
"term": { | ||
"layer": "address" | ||
} | ||
} | ||
} | ||
}, | ||
{ | ||
"bool": { | ||
"_name": "fallback.street", | ||
"boost": { "$": 17 }, | ||
"must": [ | ||
{ | ||
"match_phrase": { | ||
"address_parts.street": "street value" | ||
} | ||
} | ||
], | ||
"should": [ | ||
{ | ||
"match_phrase": { | ||
"address_parts.zip": "postcode value" | ||
} | ||
} | ||
], | ||
"filter": { | ||
"term": { | ||
"layer": "street" | ||
} | ||
} | ||
] | ||
} | ||
}, | ||
{ | ||
"bool": { | ||
"_name": "fallback.postalcode", | ||
"must": [ | ||
{ | ||
"multi_match": { | ||
"query": "postcode value", | ||
"type": "phrase", | ||
"fields": ["parent.postalcode"] | ||
} | ||
} | ||
], | ||
"filter": { | ||
"term": { | ||
"layer": "postalcode" | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
"filter": { | ||
"bool": { | ||
"must": [] | ||
} | ||
} | ||
] | ||
} | ||
@@ -93,0 +84,0 @@ }, |
@@ -5,663 +5,654 @@ { | ||
"query": { | ||
"filtered": { | ||
"query": { | ||
"bool": { | ||
"should": [ | ||
{ | ||
"bool": { | ||
"_name": "fallback.address", | ||
"boost": { "$": 19 }, | ||
"must": [ | ||
{ | ||
"match_phrase": { | ||
"address_parts.number": "house number value" | ||
} | ||
}, | ||
{ | ||
"match_phrase": { | ||
"address_parts.street": "street value" | ||
} | ||
}, | ||
{ | ||
"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": "locality 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": "region 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" | ||
] | ||
} | ||
} | ||
], | ||
"should": [], | ||
"filter": { | ||
"term": { | ||
"layer": "address" | ||
} | ||
"bool": { | ||
"should": [ | ||
{ | ||
"bool": { | ||
"_name": "fallback.address", | ||
"boost": { "$": 19 }, | ||
"must": [ | ||
{ | ||
"match_phrase": { | ||
"address_parts.number": "house number value" | ||
} | ||
}, | ||
{ | ||
"match_phrase": { | ||
"address_parts.street": "street value" | ||
} | ||
}, | ||
{ | ||
"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": "locality 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": "region 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" | ||
] | ||
} | ||
} | ||
}, | ||
{ | ||
"bool": { | ||
"_name": "fallback.street", | ||
"boost": { "$": 17 }, | ||
"must": [ | ||
{ | ||
"match_phrase": { | ||
"address_parts.street": "street value" | ||
} | ||
}, | ||
{ | ||
"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": "locality 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": "region 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" | ||
] | ||
} | ||
} | ||
], | ||
"should": [], | ||
"filter": { | ||
"term": { | ||
"layer": "street" | ||
} | ||
], | ||
"should": [], | ||
"filter": { | ||
"term": { | ||
"layer": "address" | ||
} | ||
} | ||
} | ||
}, | ||
{ | ||
"bool": { | ||
"_name": "fallback.street", | ||
"boost": { "$": 17 }, | ||
"must": [ | ||
{ | ||
"match_phrase": { | ||
"address_parts.street": "street value" | ||
} | ||
}, | ||
{ | ||
"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": "locality 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": "region 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" | ||
] | ||
} | ||
} | ||
}, | ||
{ | ||
"bool": { | ||
"_name": "fallback.neighbourhood", | ||
"must": [ | ||
{ | ||
"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": "locality 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": "region 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": "neighbourhood" | ||
} | ||
], | ||
"should": [], | ||
"filter": { | ||
"term": { | ||
"layer": "street" | ||
} | ||
} | ||
} | ||
}, | ||
{ | ||
"bool": { | ||
"_name": "fallback.neighbourhood", | ||
"must": [ | ||
{ | ||
"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": "locality 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": "region 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" | ||
] | ||
} | ||
} | ||
}, | ||
{ | ||
"bool": { | ||
"_name": "fallback.borough", | ||
"must": [ | ||
{ | ||
"multi_match": { | ||
"query": "borough value", | ||
"type": "phrase", | ||
"fields": [ | ||
"parent.borough", | ||
"parent.borough_a" | ||
] | ||
} | ||
}, | ||
{ | ||
"multi_match": { | ||
"query": "locality 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": "region 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": "borough" | ||
} | ||
], | ||
"filter": { | ||
"term": { | ||
"layer": "neighbourhood" | ||
} | ||
} | ||
} | ||
}, | ||
{ | ||
"bool": { | ||
"_name": "fallback.borough", | ||
"must": [ | ||
{ | ||
"multi_match": { | ||
"query": "borough value", | ||
"type": "phrase", | ||
"fields": [ | ||
"parent.borough", | ||
"parent.borough_a" | ||
] | ||
} | ||
}, | ||
{ | ||
"multi_match": { | ||
"query": "locality 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": "region 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" | ||
] | ||
} | ||
} | ||
}, | ||
{ | ||
"bool": { | ||
"_name": "fallback.locality", | ||
"must": [ | ||
{ | ||
"multi_match": { | ||
"query": "locality value", | ||
"type": "phrase", | ||
"fields": [ | ||
"parent.locality", | ||
"parent.locality_a" | ||
] | ||
} | ||
}, | ||
{ | ||
"multi_match": { | ||
"query": "county value", | ||
"type": "phrase", | ||
"fields": [ | ||
"parent.county", | ||
"parent.county_a", | ||
"parent.macrocounty", | ||
"parent.macrocounty_a" | ||
] | ||
} | ||
}, | ||
{ | ||
"multi_match": { | ||
"query": "region 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": "locality" | ||
} | ||
], | ||
"filter": { | ||
"term": { | ||
"layer": "borough" | ||
} | ||
} | ||
} | ||
}, | ||
{ | ||
"bool": { | ||
"_name": "fallback.locality", | ||
"must": [ | ||
{ | ||
"multi_match": { | ||
"query": "locality value", | ||
"type": "phrase", | ||
"fields": [ | ||
"parent.locality", | ||
"parent.locality_a" | ||
] | ||
} | ||
}, | ||
{ | ||
"multi_match": { | ||
"query": "county value", | ||
"type": "phrase", | ||
"fields": [ | ||
"parent.county", | ||
"parent.county_a", | ||
"parent.macrocounty", | ||
"parent.macrocounty_a" | ||
] | ||
} | ||
}, | ||
{ | ||
"multi_match": { | ||
"query": "region 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" | ||
] | ||
} | ||
} | ||
}, | ||
{ | ||
"bool": { | ||
"_name": "fallback.localadmin", | ||
"must": [ | ||
{ | ||
"multi_match": { | ||
"query": "locality value", | ||
"type": "phrase", | ||
"fields": [ | ||
"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": "region 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": "localadmin" | ||
} | ||
], | ||
"filter": { | ||
"term": { | ||
"layer": "locality" | ||
} | ||
} | ||
} | ||
}, | ||
{ | ||
"bool": { | ||
"_name": "fallback.localadmin", | ||
"must": [ | ||
{ | ||
"multi_match": { | ||
"query": "locality value", | ||
"type": "phrase", | ||
"fields": [ | ||
"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": "region 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" | ||
] | ||
} | ||
} | ||
}, | ||
{ | ||
"bool": { | ||
"_name": "fallback.county", | ||
"must": [ | ||
{ | ||
"multi_match": { | ||
"query": "county value", | ||
"type": "phrase", | ||
"fields": [ | ||
"parent.county", | ||
"parent.county_a" | ||
] | ||
} | ||
}, | ||
{ | ||
"multi_match": { | ||
"query": "region 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": "county" | ||
} | ||
], | ||
"filter": { | ||
"term": { | ||
"layer": "localadmin" | ||
} | ||
} | ||
} | ||
}, | ||
{ | ||
"bool": { | ||
"_name": "fallback.county", | ||
"must": [ | ||
{ | ||
"multi_match": { | ||
"query": "county value", | ||
"type": "phrase", | ||
"fields": [ | ||
"parent.county", | ||
"parent.county_a" | ||
] | ||
} | ||
}, | ||
{ | ||
"multi_match": { | ||
"query": "region 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" | ||
] | ||
} | ||
} | ||
}, | ||
{ | ||
"bool": { | ||
"_name": "fallback.macrocounty", | ||
"must": [ | ||
{ | ||
"multi_match": { | ||
"query": "county value", | ||
"type": "phrase", | ||
"fields": [ | ||
"parent.macrocounty", | ||
"parent.macrocounty_a" | ||
] | ||
} | ||
}, | ||
{ | ||
"multi_match": { | ||
"query": "region 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": "macrocounty" | ||
} | ||
], | ||
"filter": { | ||
"term": { | ||
"layer": "county" | ||
} | ||
} | ||
} | ||
}, | ||
{ | ||
"bool": { | ||
"_name": "fallback.macrocounty", | ||
"must": [ | ||
{ | ||
"multi_match": { | ||
"query": "county value", | ||
"type": "phrase", | ||
"fields": [ | ||
"parent.macrocounty", | ||
"parent.macrocounty_a" | ||
] | ||
} | ||
}, | ||
{ | ||
"multi_match": { | ||
"query": "region 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" | ||
] | ||
} | ||
} | ||
}, | ||
{ | ||
"bool": { | ||
"_name": "fallback.region", | ||
"must": [ | ||
{ | ||
"multi_match": { | ||
"query": "region value", | ||
"type": "phrase", | ||
"fields": [ | ||
"parent.region", | ||
"parent.region_a" | ||
] | ||
} | ||
}, | ||
{ | ||
"multi_match": { | ||
"query": "country value", | ||
"type": "phrase", | ||
"fields": [ | ||
"parent.country", | ||
"parent.country_a", | ||
"parent.dependency", | ||
"parent.dependency_a" | ||
] | ||
} | ||
} | ||
], | ||
"filter": { | ||
"term": { | ||
"layer": "region" | ||
} | ||
], | ||
"filter": { | ||
"term": { | ||
"layer": "macrocounty" | ||
} | ||
} | ||
} | ||
}, | ||
{ | ||
"bool": { | ||
"_name": "fallback.region", | ||
"must": [ | ||
{ | ||
"multi_match": { | ||
"query": "region value", | ||
"type": "phrase", | ||
"fields": [ | ||
"parent.region", | ||
"parent.region_a" | ||
] | ||
} | ||
}, | ||
{ | ||
"multi_match": { | ||
"query": "country value", | ||
"type": "phrase", | ||
"fields": [ | ||
"parent.country", | ||
"parent.country_a", | ||
"parent.dependency", | ||
"parent.dependency_a" | ||
] | ||
} | ||
} | ||
}, | ||
{ | ||
"bool": { | ||
"_name": "fallback.macroregion", | ||
"must": [ | ||
{ | ||
"multi_match": { | ||
"query": "region value", | ||
"type": "phrase", | ||
"fields": [ | ||
"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": "macroregion" | ||
} | ||
], | ||
"filter": { | ||
"term": { | ||
"layer": "region" | ||
} | ||
} | ||
} | ||
}, | ||
{ | ||
"bool": { | ||
"_name": "fallback.macroregion", | ||
"must": [ | ||
{ | ||
"multi_match": { | ||
"query": "region value", | ||
"type": "phrase", | ||
"fields": [ | ||
"parent.macroregion", | ||
"parent.macroregion_a" | ||
] | ||
} | ||
}, | ||
{ | ||
"multi_match": { | ||
"query": "country value", | ||
"type": "phrase", | ||
"fields": [ | ||
"parent.country", | ||
"parent.country_a", | ||
"parent.dependency", | ||
"parent.dependency_a" | ||
] | ||
} | ||
} | ||
}, | ||
{ | ||
"bool": { | ||
"_name": "fallback.dependency", | ||
"must": [ | ||
{ | ||
"multi_match": { | ||
"query": "country value", | ||
"type": "phrase", | ||
"fields": [ | ||
"parent.dependency", | ||
"parent.dependency_a" | ||
] | ||
} | ||
} | ||
], | ||
"filter": { | ||
"term": { | ||
"layer": "dependency" | ||
} | ||
], | ||
"filter": { | ||
"term": { | ||
"layer": "macroregion" | ||
} | ||
} | ||
} | ||
}, | ||
{ | ||
"bool": { | ||
"_name": "fallback.dependency", | ||
"must": [ | ||
{ | ||
"multi_match": { | ||
"query": "country value", | ||
"type": "phrase", | ||
"fields": [ | ||
"parent.dependency", | ||
"parent.dependency_a" | ||
] | ||
} | ||
} | ||
}, | ||
{ | ||
"bool": { | ||
"_name": "fallback.country", | ||
"must": [ | ||
{ | ||
"multi_match": { | ||
"query": "country value", | ||
"type": "phrase", | ||
"fields": [ | ||
"parent.country", | ||
"parent.country_a" | ||
] | ||
} | ||
} | ||
], | ||
"filter": { | ||
"term": { | ||
"layer": "country" | ||
} | ||
], | ||
"filter": { | ||
"term": { | ||
"layer": "dependency" | ||
} | ||
} | ||
} | ||
}, | ||
{ | ||
"bool": { | ||
"_name": "fallback.country", | ||
"must": [ | ||
{ | ||
"multi_match": { | ||
"query": "country value", | ||
"type": "phrase", | ||
"fields": [ | ||
"parent.country", | ||
"parent.country_a" | ||
] | ||
} | ||
} | ||
], | ||
"filter": { | ||
"term": { | ||
"layer": "country" | ||
} | ||
} | ||
] | ||
} | ||
} | ||
}, | ||
"filter": { | ||
"bool": { | ||
"must": [] | ||
} | ||
} | ||
] | ||
} | ||
@@ -668,0 +659,0 @@ }, |
@@ -5,160 +5,151 @@ { | ||
"query": { | ||
"filtered": { | ||
"query": { | ||
"bool": { | ||
"should": [ | ||
{ | ||
"bool": { | ||
"_name": "fallback.borough", | ||
"must": [ | ||
{ | ||
"multi_match": { | ||
"query": "locality value", | ||
"type": "phrase", | ||
"fields": [ | ||
"parent.borough", | ||
"parent.borough_a" | ||
] | ||
} | ||
}, | ||
{ | ||
"multi_match": { | ||
"query": "region value", | ||
"type": "phrase", | ||
"fields": [ | ||
"parent.region", | ||
"parent.region_a", | ||
"parent.macroregion", | ||
"parent.macroregion_a" | ||
] | ||
} | ||
} | ||
], | ||
"filter": { | ||
"term": { | ||
"layer": "borough" | ||
} | ||
"bool": { | ||
"should": [ | ||
{ | ||
"bool": { | ||
"_name": "fallback.borough", | ||
"must": [ | ||
{ | ||
"multi_match": { | ||
"query": "locality value", | ||
"type": "phrase", | ||
"fields": [ | ||
"parent.borough", | ||
"parent.borough_a" | ||
] | ||
} | ||
}, | ||
{ | ||
"multi_match": { | ||
"query": "region value", | ||
"type": "phrase", | ||
"fields": [ | ||
"parent.region", | ||
"parent.region_a", | ||
"parent.macroregion", | ||
"parent.macroregion_a" | ||
] | ||
} | ||
} | ||
}, | ||
{ | ||
"bool": { | ||
"_name": "fallback.locality", | ||
"must": [ | ||
{ | ||
"multi_match": { | ||
"query": "locality value", | ||
"type": "phrase", | ||
"fields": [ | ||
"parent.locality", | ||
"parent.locality_a" | ||
] | ||
} | ||
}, | ||
{ | ||
"multi_match": { | ||
"query": "region value", | ||
"type": "phrase", | ||
"fields": [ | ||
"parent.region", | ||
"parent.region_a", | ||
"parent.macroregion", | ||
"parent.macroregion_a" | ||
] | ||
} | ||
} | ||
], | ||
"filter": { | ||
"term": { | ||
"layer": "locality" | ||
} | ||
], | ||
"filter": { | ||
"term": { | ||
"layer": "borough" | ||
} | ||
} | ||
} | ||
}, | ||
{ | ||
"bool": { | ||
"_name": "fallback.locality", | ||
"must": [ | ||
{ | ||
"multi_match": { | ||
"query": "locality value", | ||
"type": "phrase", | ||
"fields": [ | ||
"parent.locality", | ||
"parent.locality_a" | ||
] | ||
} | ||
}, | ||
{ | ||
"multi_match": { | ||
"query": "region value", | ||
"type": "phrase", | ||
"fields": [ | ||
"parent.region", | ||
"parent.region_a", | ||
"parent.macroregion", | ||
"parent.macroregion_a" | ||
] | ||
} | ||
} | ||
}, | ||
{ | ||
"bool": { | ||
"_name": "fallback.localadmin", | ||
"must": [ | ||
{ | ||
"multi_match": { | ||
"query": "locality value", | ||
"type": "phrase", | ||
"fields": [ | ||
"parent.localadmin", | ||
"parent.localadmin_a" | ||
] | ||
} | ||
}, | ||
{ | ||
"multi_match": { | ||
"query": "region value", | ||
"type": "phrase", | ||
"fields": [ | ||
"parent.region", | ||
"parent.region_a", | ||
"parent.macroregion", | ||
"parent.macroregion_a" | ||
] | ||
} | ||
} | ||
], | ||
"filter": { | ||
"term": { | ||
"layer": "localadmin" | ||
} | ||
], | ||
"filter": { | ||
"term": { | ||
"layer": "locality" | ||
} | ||
} | ||
} | ||
}, | ||
{ | ||
"bool": { | ||
"_name": "fallback.localadmin", | ||
"must": [ | ||
{ | ||
"multi_match": { | ||
"query": "locality value", | ||
"type": "phrase", | ||
"fields": [ | ||
"parent.localadmin", | ||
"parent.localadmin_a" | ||
] | ||
} | ||
}, | ||
{ | ||
"multi_match": { | ||
"query": "region value", | ||
"type": "phrase", | ||
"fields": [ | ||
"parent.region", | ||
"parent.region_a", | ||
"parent.macroregion", | ||
"parent.macroregion_a" | ||
] | ||
} | ||
} | ||
}, | ||
{ | ||
"bool": { | ||
"_name": "fallback.region", | ||
"must": [ | ||
{ | ||
"multi_match": { | ||
"query": "region value", | ||
"type": "phrase", | ||
"fields": [ | ||
"parent.region", | ||
"parent.region_a" | ||
] | ||
} | ||
} | ||
], | ||
"filter": { | ||
"term": { | ||
"layer": "region" | ||
} | ||
], | ||
"filter": { | ||
"term": { | ||
"layer": "localadmin" | ||
} | ||
} | ||
} | ||
}, | ||
{ | ||
"bool": { | ||
"_name": "fallback.region", | ||
"must": [ | ||
{ | ||
"multi_match": { | ||
"query": "region value", | ||
"type": "phrase", | ||
"fields": [ | ||
"parent.region", | ||
"parent.region_a" | ||
] | ||
} | ||
} | ||
}, | ||
{ | ||
"bool": { | ||
"_name": "fallback.macroregion", | ||
"must": [ | ||
{ | ||
"multi_match": { | ||
"query": "region value", | ||
"type": "phrase", | ||
"fields": [ | ||
"parent.macroregion", | ||
"parent.macroregion_a" | ||
] | ||
} | ||
} | ||
], | ||
"filter": { | ||
"term": { | ||
"layer": "macroregion" | ||
} | ||
], | ||
"filter": { | ||
"term": { | ||
"layer": "region" | ||
} | ||
} | ||
} | ||
}, | ||
{ | ||
"bool": { | ||
"_name": "fallback.macroregion", | ||
"must": [ | ||
{ | ||
"multi_match": { | ||
"query": "region value", | ||
"type": "phrase", | ||
"fields": [ | ||
"parent.macroregion", | ||
"parent.macroregion_a" | ||
] | ||
} | ||
} | ||
], | ||
"filter": { | ||
"term": { | ||
"layer": "macroregion" | ||
} | ||
} | ||
] | ||
} | ||
} | ||
}, | ||
"filter": { | ||
"bool": { | ||
"must": [] | ||
} | ||
} | ||
] | ||
} | ||
@@ -165,0 +156,0 @@ }, |
@@ -5,753 +5,744 @@ { | ||
"query": { | ||
"filtered": { | ||
"query": { | ||
"bool": { | ||
"should": [ | ||
{ | ||
"bool": { | ||
"_name": "fallback.venue", | ||
"must": [ | ||
{ | ||
"multi_match": { | ||
"query": "query value", | ||
"type": "phrase", | ||
"fields": [ | ||
"phrase.default", | ||
"category" | ||
] | ||
} | ||
}, | ||
{ | ||
"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": "locality 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": "region 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": { | ||
"should": [ | ||
{ | ||
"bool": { | ||
"_name": "fallback.venue", | ||
"must": [ | ||
{ | ||
"multi_match": { | ||
"query": "query value", | ||
"type": "phrase", | ||
"fields": [ | ||
"phrase.default", | ||
"category" | ||
] | ||
} | ||
}, | ||
{ | ||
"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": "locality 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": "region 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" | ||
] | ||
} | ||
} | ||
}, | ||
{ | ||
"bool": { | ||
"_name": "fallback.address", | ||
"boost": { "$": 19 }, | ||
"must": [ | ||
{ | ||
"match_phrase": { | ||
"address_parts.number": "house number value" | ||
} | ||
}, | ||
{ | ||
"match_phrase": { | ||
"address_parts.street": "street value" | ||
} | ||
}, | ||
{ | ||
"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": "locality 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": "region 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" | ||
] | ||
} | ||
} | ||
], | ||
"should": [], | ||
"filter": { | ||
"term": { | ||
"layer": "address" | ||
} | ||
], | ||
"filter": { | ||
"term": { | ||
"layer": "venue" | ||
} | ||
} | ||
} | ||
}, | ||
{ | ||
"bool": { | ||
"_name": "fallback.address", | ||
"boost": { "$": 19 }, | ||
"must": [ | ||
{ | ||
"match_phrase": { | ||
"address_parts.number": "house number value" | ||
} | ||
}, | ||
{ | ||
"match_phrase": { | ||
"address_parts.street": "street value" | ||
} | ||
}, | ||
{ | ||
"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": "locality 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": "region 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" | ||
] | ||
} | ||
} | ||
}, | ||
{ | ||
"bool": { | ||
"_name": "fallback.street", | ||
"boost": { "$": 17 }, | ||
"must": [ | ||
{ | ||
"match_phrase": { | ||
"address_parts.street": "street value" | ||
} | ||
}, | ||
{ | ||
"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": "locality 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": "region 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" | ||
] | ||
} | ||
} | ||
], | ||
"should": [], | ||
"filter": { | ||
"term": { | ||
"layer": "street" | ||
} | ||
], | ||
"should": [], | ||
"filter": { | ||
"term": { | ||
"layer": "address" | ||
} | ||
} | ||
} | ||
}, | ||
{ | ||
"bool": { | ||
"_name": "fallback.street", | ||
"boost": { "$": 17 }, | ||
"must": [ | ||
{ | ||
"match_phrase": { | ||
"address_parts.street": "street value" | ||
} | ||
}, | ||
{ | ||
"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": "locality 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": "region 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" | ||
] | ||
} | ||
} | ||
}, | ||
{ | ||
"bool": { | ||
"_name": "fallback.neighbourhood", | ||
"must": [ | ||
{ | ||
"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": "locality 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": "region 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": "neighbourhood" | ||
} | ||
], | ||
"should": [], | ||
"filter": { | ||
"term": { | ||
"layer": "street" | ||
} | ||
} | ||
} | ||
}, | ||
{ | ||
"bool": { | ||
"_name": "fallback.neighbourhood", | ||
"must": [ | ||
{ | ||
"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": "locality 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": "region 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" | ||
] | ||
} | ||
} | ||
}, | ||
{ | ||
"bool": { | ||
"_name": "fallback.borough", | ||
"must": [ | ||
{ | ||
"multi_match": { | ||
"query": "borough value", | ||
"type": "phrase", | ||
"fields": [ | ||
"parent.borough", | ||
"parent.borough_a" | ||
] | ||
} | ||
}, | ||
{ | ||
"multi_match": { | ||
"query": "locality 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": "region 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": "borough" | ||
} | ||
], | ||
"filter": { | ||
"term": { | ||
"layer": "neighbourhood" | ||
} | ||
} | ||
} | ||
}, | ||
{ | ||
"bool": { | ||
"_name": "fallback.borough", | ||
"must": [ | ||
{ | ||
"multi_match": { | ||
"query": "borough value", | ||
"type": "phrase", | ||
"fields": [ | ||
"parent.borough", | ||
"parent.borough_a" | ||
] | ||
} | ||
}, | ||
{ | ||
"multi_match": { | ||
"query": "locality 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": "region 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" | ||
] | ||
} | ||
} | ||
}, | ||
{ | ||
"bool": { | ||
"_name": "fallback.locality", | ||
"must": [ | ||
{ | ||
"multi_match": { | ||
"query": "locality value", | ||
"type": "phrase", | ||
"fields": [ | ||
"parent.locality", | ||
"parent.locality_a" | ||
] | ||
} | ||
}, | ||
{ | ||
"multi_match": { | ||
"query": "county value", | ||
"type": "phrase", | ||
"fields": [ | ||
"parent.county", | ||
"parent.county_a", | ||
"parent.macrocounty", | ||
"parent.macrocounty_a" | ||
] | ||
} | ||
}, | ||
{ | ||
"multi_match": { | ||
"query": "region 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": "locality" | ||
} | ||
], | ||
"filter": { | ||
"term": { | ||
"layer": "borough" | ||
} | ||
} | ||
} | ||
}, | ||
{ | ||
"bool": { | ||
"_name": "fallback.locality", | ||
"must": [ | ||
{ | ||
"multi_match": { | ||
"query": "locality value", | ||
"type": "phrase", | ||
"fields": [ | ||
"parent.locality", | ||
"parent.locality_a" | ||
] | ||
} | ||
}, | ||
{ | ||
"multi_match": { | ||
"query": "county value", | ||
"type": "phrase", | ||
"fields": [ | ||
"parent.county", | ||
"parent.county_a", | ||
"parent.macrocounty", | ||
"parent.macrocounty_a" | ||
] | ||
} | ||
}, | ||
{ | ||
"multi_match": { | ||
"query": "region 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" | ||
] | ||
} | ||
} | ||
}, | ||
{ | ||
"bool": { | ||
"_name": "fallback.localadmin", | ||
"must": [ | ||
{ | ||
"multi_match": { | ||
"query": "locality value", | ||
"type": "phrase", | ||
"fields": [ | ||
"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": "region 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": "localadmin" | ||
} | ||
], | ||
"filter": { | ||
"term": { | ||
"layer": "locality" | ||
} | ||
} | ||
} | ||
}, | ||
{ | ||
"bool": { | ||
"_name": "fallback.localadmin", | ||
"must": [ | ||
{ | ||
"multi_match": { | ||
"query": "locality value", | ||
"type": "phrase", | ||
"fields": [ | ||
"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": "region 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" | ||
] | ||
} | ||
} | ||
}, | ||
{ | ||
"bool": { | ||
"_name": "fallback.county", | ||
"must": [ | ||
{ | ||
"multi_match": { | ||
"query": "county value", | ||
"type": "phrase", | ||
"fields": [ | ||
"parent.county", | ||
"parent.county_a" | ||
] | ||
} | ||
}, | ||
{ | ||
"multi_match": { | ||
"query": "region 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": "county" | ||
} | ||
], | ||
"filter": { | ||
"term": { | ||
"layer": "localadmin" | ||
} | ||
} | ||
} | ||
}, | ||
{ | ||
"bool": { | ||
"_name": "fallback.county", | ||
"must": [ | ||
{ | ||
"multi_match": { | ||
"query": "county value", | ||
"type": "phrase", | ||
"fields": [ | ||
"parent.county", | ||
"parent.county_a" | ||
] | ||
} | ||
}, | ||
{ | ||
"multi_match": { | ||
"query": "region 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" | ||
] | ||
} | ||
} | ||
}, | ||
{ | ||
"bool": { | ||
"_name": "fallback.macrocounty", | ||
"must": [ | ||
{ | ||
"multi_match": { | ||
"query": "county value", | ||
"type": "phrase", | ||
"fields": [ | ||
"parent.macrocounty", | ||
"parent.macrocounty_a" | ||
] | ||
} | ||
}, | ||
{ | ||
"multi_match": { | ||
"query": "region 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": "macrocounty" | ||
} | ||
], | ||
"filter": { | ||
"term": { | ||
"layer": "county" | ||
} | ||
} | ||
} | ||
}, | ||
{ | ||
"bool": { | ||
"_name": "fallback.macrocounty", | ||
"must": [ | ||
{ | ||
"multi_match": { | ||
"query": "county value", | ||
"type": "phrase", | ||
"fields": [ | ||
"parent.macrocounty", | ||
"parent.macrocounty_a" | ||
] | ||
} | ||
}, | ||
{ | ||
"multi_match": { | ||
"query": "region 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" | ||
] | ||
} | ||
} | ||
}, | ||
{ | ||
"bool": { | ||
"_name": "fallback.region", | ||
"must": [ | ||
{ | ||
"multi_match": { | ||
"query": "region value", | ||
"type": "phrase", | ||
"fields": [ | ||
"parent.region", | ||
"parent.region_a" | ||
] | ||
} | ||
}, | ||
{ | ||
"multi_match": { | ||
"query": "country value", | ||
"type": "phrase", | ||
"fields": [ | ||
"parent.country", | ||
"parent.country_a", | ||
"parent.dependency", | ||
"parent.dependency_a" | ||
] | ||
} | ||
} | ||
], | ||
"filter": { | ||
"term": { | ||
"layer": "region" | ||
} | ||
], | ||
"filter": { | ||
"term": { | ||
"layer": "macrocounty" | ||
} | ||
} | ||
} | ||
}, | ||
{ | ||
"bool": { | ||
"_name": "fallback.region", | ||
"must": [ | ||
{ | ||
"multi_match": { | ||
"query": "region value", | ||
"type": "phrase", | ||
"fields": [ | ||
"parent.region", | ||
"parent.region_a" | ||
] | ||
} | ||
}, | ||
{ | ||
"multi_match": { | ||
"query": "country value", | ||
"type": "phrase", | ||
"fields": [ | ||
"parent.country", | ||
"parent.country_a", | ||
"parent.dependency", | ||
"parent.dependency_a" | ||
] | ||
} | ||
} | ||
}, | ||
{ | ||
"bool": { | ||
"_name": "fallback.macroregion", | ||
"must": [ | ||
{ | ||
"multi_match": { | ||
"query": "region value", | ||
"type": "phrase", | ||
"fields": [ | ||
"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": "macroregion" | ||
} | ||
], | ||
"filter": { | ||
"term": { | ||
"layer": "region" | ||
} | ||
} | ||
} | ||
}, | ||
{ | ||
"bool": { | ||
"_name": "fallback.macroregion", | ||
"must": [ | ||
{ | ||
"multi_match": { | ||
"query": "region value", | ||
"type": "phrase", | ||
"fields": [ | ||
"parent.macroregion", | ||
"parent.macroregion_a" | ||
] | ||
} | ||
}, | ||
{ | ||
"multi_match": { | ||
"query": "country value", | ||
"type": "phrase", | ||
"fields": [ | ||
"parent.country", | ||
"parent.country_a", | ||
"parent.dependency", | ||
"parent.dependency_a" | ||
] | ||
} | ||
} | ||
}, | ||
{ | ||
"bool": { | ||
"_name": "fallback.dependency", | ||
"must": [ | ||
{ | ||
"multi_match": { | ||
"query": "country value", | ||
"type": "phrase", | ||
"fields": [ | ||
"parent.dependency", | ||
"parent.dependency_a" | ||
] | ||
} | ||
} | ||
], | ||
"filter": { | ||
"term": { | ||
"layer": "dependency" | ||
} | ||
], | ||
"filter": { | ||
"term": { | ||
"layer": "macroregion" | ||
} | ||
} | ||
} | ||
}, | ||
{ | ||
"bool": { | ||
"_name": "fallback.dependency", | ||
"must": [ | ||
{ | ||
"multi_match": { | ||
"query": "country value", | ||
"type": "phrase", | ||
"fields": [ | ||
"parent.dependency", | ||
"parent.dependency_a" | ||
] | ||
} | ||
} | ||
}, | ||
{ | ||
"bool": { | ||
"_name": "fallback.country", | ||
"must": [ | ||
{ | ||
"multi_match": { | ||
"query": "country value", | ||
"type": "phrase", | ||
"fields": [ | ||
"parent.country", | ||
"parent.country_a" | ||
] | ||
} | ||
} | ||
], | ||
"filter": { | ||
"term": { | ||
"layer": "country" | ||
} | ||
], | ||
"filter": { | ||
"term": { | ||
"layer": "dependency" | ||
} | ||
} | ||
} | ||
}, | ||
{ | ||
"bool": { | ||
"_name": "fallback.country", | ||
"must": [ | ||
{ | ||
"multi_match": { | ||
"query": "country value", | ||
"type": "phrase", | ||
"fields": [ | ||
"parent.country", | ||
"parent.country_a" | ||
] | ||
} | ||
} | ||
], | ||
"filter": { | ||
"term": { | ||
"layer": "country" | ||
} | ||
} | ||
] | ||
} | ||
} | ||
}, | ||
"filter": { | ||
"bool": { | ||
"must": [] | ||
} | ||
} | ||
] | ||
} | ||
@@ -758,0 +749,0 @@ }, |
@@ -126,4 +126,4 @@ var FallbackQuery = require('../../layout/FallbackQuery'); | ||
t.false(actual.query.function_score.query.filtered.query.bool.should[0].bool.hasOwnProperty('boost')); | ||
t.false(actual.query.function_score.query.filtered.query.bool.should[1].bool.hasOwnProperty('boost')); | ||
t.false(actual.query.function_score.query.bool.should[0].bool.hasOwnProperty('boost')); | ||
t.false(actual.query.function_score.query.bool.should[1].bool.hasOwnProperty('boost')); | ||
t.end(); | ||
@@ -214,3 +214,3 @@ | ||
t.equals(filter_views_called, 8); | ||
t.deepEquals(actual.query.function_score.query.filtered.filter.bool.must, expected_filter); | ||
t.deepEquals(actual.query.function_score.query.bool.filter.bool.must, expected_filter); | ||
t.end(); | ||
@@ -217,0 +217,0 @@ |
@@ -23,22 +23,22 @@ var GeodisambiguationQuery = require('../../layout/GeodisambiguationQuery'); | ||
t.equals(actual.query.function_score.query.filtered.query.bool.should.length, 10); | ||
t.deepEquals(actual.query.function_score.query.filtered.query.bool.should[0], individualLayer('neighbourhood', | ||
t.equals(actual.query.function_score.query.bool.should.length, 10); | ||
t.deepEquals(actual.query.function_score.query.bool.should[0], individualLayer('neighbourhood', | ||
'coarse neighbourhood value', ['parent.neighbourhood', 'parent.neighbourhood_a'])); | ||
t.deepEquals(actual.query.function_score.query.filtered.query.bool.should[1], individualLayer('borough', | ||
t.deepEquals(actual.query.function_score.query.bool.should[1], individualLayer('borough', | ||
'coarse neighbourhood value', ['parent.borough', 'parent.borough_a'])); | ||
t.deepEquals(actual.query.function_score.query.filtered.query.bool.should[2], individualLayer('locality', | ||
t.deepEquals(actual.query.function_score.query.bool.should[2], individualLayer('locality', | ||
'coarse neighbourhood value', ['parent.locality', 'parent.locality_a'])); | ||
t.deepEquals(actual.query.function_score.query.filtered.query.bool.should[3], individualLayer('localadmin', | ||
t.deepEquals(actual.query.function_score.query.bool.should[3], individualLayer('localadmin', | ||
'coarse neighbourhood value', ['parent.localadmin', 'parent.localadmin_a'])); | ||
t.deepEquals(actual.query.function_score.query.filtered.query.bool.should[4], individualLayer('county', | ||
t.deepEquals(actual.query.function_score.query.bool.should[4], individualLayer('county', | ||
'coarse neighbourhood value', ['parent.county', 'parent.county_a'])); | ||
t.deepEquals(actual.query.function_score.query.filtered.query.bool.should[5], individualLayer('macrocounty', | ||
t.deepEquals(actual.query.function_score.query.bool.should[5], individualLayer('macrocounty', | ||
'coarse neighbourhood value', ['parent.macrocounty', 'parent.macrocounty_a'])); | ||
t.deepEquals(actual.query.function_score.query.filtered.query.bool.should[6], individualLayer('region', | ||
t.deepEquals(actual.query.function_score.query.bool.should[6], individualLayer('region', | ||
'coarse neighbourhood value', ['parent.region', 'parent.region_a'])); | ||
t.deepEquals(actual.query.function_score.query.filtered.query.bool.should[7], individualLayer('macroregion', | ||
t.deepEquals(actual.query.function_score.query.bool.should[7], individualLayer('macroregion', | ||
'coarse neighbourhood value', ['parent.macroregion', 'parent.macroregion_a'])); | ||
t.deepEquals(actual.query.function_score.query.filtered.query.bool.should[8], individualLayer('dependency', | ||
t.deepEquals(actual.query.function_score.query.bool.should[8], individualLayer('dependency', | ||
'coarse neighbourhood value', ['parent.dependency', 'parent.dependency_a'])); | ||
t.deepEquals(actual.query.function_score.query.filtered.query.bool.should[9], individualLayer('country', | ||
t.deepEquals(actual.query.function_score.query.bool.should[9], individualLayer('country', | ||
'coarse neighbourhood value', ['parent.country', 'parent.country_a'])); | ||
@@ -67,22 +67,22 @@ | ||
t.equals(actual.query.function_score.query.filtered.query.bool.should.length, 10); | ||
t.deepEquals(actual.query.function_score.query.filtered.query.bool.should[0], individualLayer('neighbourhood', | ||
t.equals(actual.query.function_score.query.bool.should.length, 10); | ||
t.deepEquals(actual.query.function_score.query.bool.should[0], individualLayer('neighbourhood', | ||
'coarse borough value', ['parent.neighbourhood', 'parent.neighbourhood_a'])); | ||
t.deepEquals(actual.query.function_score.query.filtered.query.bool.should[1], individualLayer('borough', | ||
t.deepEquals(actual.query.function_score.query.bool.should[1], individualLayer('borough', | ||
'coarse borough value', ['parent.borough', 'parent.borough_a'])); | ||
t.deepEquals(actual.query.function_score.query.filtered.query.bool.should[2], individualLayer('locality', | ||
t.deepEquals(actual.query.function_score.query.bool.should[2], individualLayer('locality', | ||
'coarse borough value', ['parent.locality', 'parent.locality_a'])); | ||
t.deepEquals(actual.query.function_score.query.filtered.query.bool.should[3], individualLayer('localadmin', | ||
t.deepEquals(actual.query.function_score.query.bool.should[3], individualLayer('localadmin', | ||
'coarse borough value', ['parent.localadmin', 'parent.localadmin_a'])); | ||
t.deepEquals(actual.query.function_score.query.filtered.query.bool.should[4], individualLayer('county', | ||
t.deepEquals(actual.query.function_score.query.bool.should[4], individualLayer('county', | ||
'coarse borough value', ['parent.county', 'parent.county_a'])); | ||
t.deepEquals(actual.query.function_score.query.filtered.query.bool.should[5], individualLayer('macrocounty', | ||
t.deepEquals(actual.query.function_score.query.bool.should[5], individualLayer('macrocounty', | ||
'coarse borough value', ['parent.macrocounty', 'parent.macrocounty_a'])); | ||
t.deepEquals(actual.query.function_score.query.filtered.query.bool.should[6], individualLayer('region', | ||
t.deepEquals(actual.query.function_score.query.bool.should[6], individualLayer('region', | ||
'coarse borough value', ['parent.region', 'parent.region_a'])); | ||
t.deepEquals(actual.query.function_score.query.filtered.query.bool.should[7], individualLayer('macroregion', | ||
t.deepEquals(actual.query.function_score.query.bool.should[7], individualLayer('macroregion', | ||
'coarse borough value', ['parent.macroregion', 'parent.macroregion_a'])); | ||
t.deepEquals(actual.query.function_score.query.filtered.query.bool.should[8], individualLayer('dependency', | ||
t.deepEquals(actual.query.function_score.query.bool.should[8], individualLayer('dependency', | ||
'coarse borough value', ['parent.dependency', 'parent.dependency_a'])); | ||
t.deepEquals(actual.query.function_score.query.filtered.query.bool.should[9], individualLayer('country', | ||
t.deepEquals(actual.query.function_score.query.bool.should[9], individualLayer('country', | ||
'coarse borough value', ['parent.country', 'parent.country_a'])); | ||
@@ -110,22 +110,22 @@ | ||
t.equals(actual.query.function_score.query.filtered.query.bool.should.length, 10); | ||
t.deepEquals(actual.query.function_score.query.filtered.query.bool.should[0], individualLayer('neighbourhood', | ||
t.equals(actual.query.function_score.query.bool.should.length, 10); | ||
t.deepEquals(actual.query.function_score.query.bool.should[0], individualLayer('neighbourhood', | ||
'coarse city value', ['parent.neighbourhood', 'parent.neighbourhood_a'])); | ||
t.deepEquals(actual.query.function_score.query.filtered.query.bool.should[1], individualLayer('borough', | ||
t.deepEquals(actual.query.function_score.query.bool.should[1], individualLayer('borough', | ||
'coarse city value', ['parent.borough', 'parent.borough_a'])); | ||
t.deepEquals(actual.query.function_score.query.filtered.query.bool.should[2], individualLayer('locality', | ||
t.deepEquals(actual.query.function_score.query.bool.should[2], individualLayer('locality', | ||
'coarse city value', ['parent.locality', 'parent.locality_a'])); | ||
t.deepEquals(actual.query.function_score.query.filtered.query.bool.should[3], individualLayer('localadmin', | ||
t.deepEquals(actual.query.function_score.query.bool.should[3], individualLayer('localadmin', | ||
'coarse city value', ['parent.localadmin', 'parent.localadmin_a'])); | ||
t.deepEquals(actual.query.function_score.query.filtered.query.bool.should[4], individualLayer('county', | ||
t.deepEquals(actual.query.function_score.query.bool.should[4], individualLayer('county', | ||
'coarse city value', ['parent.county', 'parent.county_a'])); | ||
t.deepEquals(actual.query.function_score.query.filtered.query.bool.should[5], individualLayer('macrocounty', | ||
t.deepEquals(actual.query.function_score.query.bool.should[5], individualLayer('macrocounty', | ||
'coarse city value', ['parent.macrocounty', 'parent.macrocounty_a'])); | ||
t.deepEquals(actual.query.function_score.query.filtered.query.bool.should[6], individualLayer('region', | ||
t.deepEquals(actual.query.function_score.query.bool.should[6], individualLayer('region', | ||
'coarse city value', ['parent.region', 'parent.region_a'])); | ||
t.deepEquals(actual.query.function_score.query.filtered.query.bool.should[7], individualLayer('macroregion', | ||
t.deepEquals(actual.query.function_score.query.bool.should[7], individualLayer('macroregion', | ||
'coarse city value', ['parent.macroregion', 'parent.macroregion_a'])); | ||
t.deepEquals(actual.query.function_score.query.filtered.query.bool.should[8], individualLayer('dependency', | ||
t.deepEquals(actual.query.function_score.query.bool.should[8], individualLayer('dependency', | ||
'coarse city value', ['parent.dependency', 'parent.dependency_a'])); | ||
t.deepEquals(actual.query.function_score.query.filtered.query.bool.should[9], individualLayer('country', | ||
t.deepEquals(actual.query.function_score.query.bool.should[9], individualLayer('country', | ||
'coarse city value', ['parent.country', 'parent.country_a'])); | ||
@@ -152,22 +152,22 @@ | ||
t.equals(actual.query.function_score.query.filtered.query.bool.should.length, 10); | ||
t.deepEquals(actual.query.function_score.query.filtered.query.bool.should[0], individualLayer('neighbourhood', | ||
t.equals(actual.query.function_score.query.bool.should.length, 10); | ||
t.deepEquals(actual.query.function_score.query.bool.should[0], individualLayer('neighbourhood', | ||
'coarse county value', ['parent.neighbourhood', 'parent.neighbourhood_a'])); | ||
t.deepEquals(actual.query.function_score.query.filtered.query.bool.should[1], individualLayer('borough', | ||
t.deepEquals(actual.query.function_score.query.bool.should[1], individualLayer('borough', | ||
'coarse county value', ['parent.borough', 'parent.borough_a'])); | ||
t.deepEquals(actual.query.function_score.query.filtered.query.bool.should[2], individualLayer('locality', | ||
t.deepEquals(actual.query.function_score.query.bool.should[2], individualLayer('locality', | ||
'coarse county value', ['parent.locality', 'parent.locality_a'])); | ||
t.deepEquals(actual.query.function_score.query.filtered.query.bool.should[3], individualLayer('localadmin', | ||
t.deepEquals(actual.query.function_score.query.bool.should[3], individualLayer('localadmin', | ||
'coarse county value', ['parent.localadmin', 'parent.localadmin_a'])); | ||
t.deepEquals(actual.query.function_score.query.filtered.query.bool.should[4], individualLayer('county', | ||
t.deepEquals(actual.query.function_score.query.bool.should[4], individualLayer('county', | ||
'coarse county value', ['parent.county', 'parent.county_a'])); | ||
t.deepEquals(actual.query.function_score.query.filtered.query.bool.should[5], individualLayer('macrocounty', | ||
t.deepEquals(actual.query.function_score.query.bool.should[5], individualLayer('macrocounty', | ||
'coarse county value', ['parent.macrocounty', 'parent.macrocounty_a'])); | ||
t.deepEquals(actual.query.function_score.query.filtered.query.bool.should[6], individualLayer('region', | ||
t.deepEquals(actual.query.function_score.query.bool.should[6], individualLayer('region', | ||
'coarse county value', ['parent.region', 'parent.region_a'])); | ||
t.deepEquals(actual.query.function_score.query.filtered.query.bool.should[7], individualLayer('macroregion', | ||
t.deepEquals(actual.query.function_score.query.bool.should[7], individualLayer('macroregion', | ||
'coarse county value', ['parent.macroregion', 'parent.macroregion_a'])); | ||
t.deepEquals(actual.query.function_score.query.filtered.query.bool.should[8], individualLayer('dependency', | ||
t.deepEquals(actual.query.function_score.query.bool.should[8], individualLayer('dependency', | ||
'coarse county value', ['parent.dependency', 'parent.dependency_a'])); | ||
t.deepEquals(actual.query.function_score.query.filtered.query.bool.should[9], individualLayer('country', | ||
t.deepEquals(actual.query.function_score.query.bool.should[9], individualLayer('country', | ||
'coarse county value', ['parent.country', 'parent.country_a'])); | ||
@@ -193,22 +193,22 @@ | ||
t.equals(actual.query.function_score.query.filtered.query.bool.should.length, 10); | ||
t.deepEquals(actual.query.function_score.query.filtered.query.bool.should[0], individualLayer('neighbourhood', | ||
t.equals(actual.query.function_score.query.bool.should.length, 10); | ||
t.deepEquals(actual.query.function_score.query.bool.should[0], individualLayer('neighbourhood', | ||
'coarse region value', ['parent.neighbourhood', 'parent.neighbourhood_a'])); | ||
t.deepEquals(actual.query.function_score.query.filtered.query.bool.should[1], individualLayer('borough', | ||
t.deepEquals(actual.query.function_score.query.bool.should[1], individualLayer('borough', | ||
'coarse region value', ['parent.borough', 'parent.borough_a'])); | ||
t.deepEquals(actual.query.function_score.query.filtered.query.bool.should[2], individualLayer('locality', | ||
t.deepEquals(actual.query.function_score.query.bool.should[2], individualLayer('locality', | ||
'coarse region value', ['parent.locality', 'parent.locality_a'])); | ||
t.deepEquals(actual.query.function_score.query.filtered.query.bool.should[3], individualLayer('localadmin', | ||
t.deepEquals(actual.query.function_score.query.bool.should[3], individualLayer('localadmin', | ||
'coarse region value', ['parent.localadmin', 'parent.localadmin_a'])); | ||
t.deepEquals(actual.query.function_score.query.filtered.query.bool.should[4], individualLayer('county', | ||
t.deepEquals(actual.query.function_score.query.bool.should[4], individualLayer('county', | ||
'coarse region value', ['parent.county', 'parent.county_a'])); | ||
t.deepEquals(actual.query.function_score.query.filtered.query.bool.should[5], individualLayer('macrocounty', | ||
t.deepEquals(actual.query.function_score.query.bool.should[5], individualLayer('macrocounty', | ||
'coarse region value', ['parent.macrocounty', 'parent.macrocounty_a'])); | ||
t.deepEquals(actual.query.function_score.query.filtered.query.bool.should[6], individualLayer('region', | ||
t.deepEquals(actual.query.function_score.query.bool.should[6], individualLayer('region', | ||
'coarse region value', ['parent.region', 'parent.region_a'])); | ||
t.deepEquals(actual.query.function_score.query.filtered.query.bool.should[7], individualLayer('macroregion', | ||
t.deepEquals(actual.query.function_score.query.bool.should[7], individualLayer('macroregion', | ||
'coarse region value', ['parent.macroregion', 'parent.macroregion_a'])); | ||
t.deepEquals(actual.query.function_score.query.filtered.query.bool.should[8], individualLayer('dependency', | ||
t.deepEquals(actual.query.function_score.query.bool.should[8], individualLayer('dependency', | ||
'coarse region value', ['parent.dependency', 'parent.dependency_a'])); | ||
t.deepEquals(actual.query.function_score.query.filtered.query.bool.should[9], individualLayer('country', | ||
t.deepEquals(actual.query.function_score.query.bool.should[9], individualLayer('country', | ||
'coarse region value', ['parent.country', 'parent.country_a'])); | ||
@@ -233,22 +233,22 @@ | ||
t.equals(actual.query.function_score.query.filtered.query.bool.should.length, 10); | ||
t.deepEquals(actual.query.function_score.query.filtered.query.bool.should[0], individualLayer('neighbourhood', | ||
t.equals(actual.query.function_score.query.bool.should.length, 10); | ||
t.deepEquals(actual.query.function_score.query.bool.should[0], individualLayer('neighbourhood', | ||
'coarse country value', ['parent.neighbourhood', 'parent.neighbourhood_a'])); | ||
t.deepEquals(actual.query.function_score.query.filtered.query.bool.should[1], individualLayer('borough', | ||
t.deepEquals(actual.query.function_score.query.bool.should[1], individualLayer('borough', | ||
'coarse country value', ['parent.borough', 'parent.borough_a'])); | ||
t.deepEquals(actual.query.function_score.query.filtered.query.bool.should[2], individualLayer('locality', | ||
t.deepEquals(actual.query.function_score.query.bool.should[2], individualLayer('locality', | ||
'coarse country value', ['parent.locality', 'parent.locality_a'])); | ||
t.deepEquals(actual.query.function_score.query.filtered.query.bool.should[3], individualLayer('localadmin', | ||
t.deepEquals(actual.query.function_score.query.bool.should[3], individualLayer('localadmin', | ||
'coarse country value', ['parent.localadmin', 'parent.localadmin_a'])); | ||
t.deepEquals(actual.query.function_score.query.filtered.query.bool.should[4], individualLayer('county', | ||
t.deepEquals(actual.query.function_score.query.bool.should[4], individualLayer('county', | ||
'coarse country value', ['parent.county', 'parent.county_a'])); | ||
t.deepEquals(actual.query.function_score.query.filtered.query.bool.should[5], individualLayer('macrocounty', | ||
t.deepEquals(actual.query.function_score.query.bool.should[5], individualLayer('macrocounty', | ||
'coarse country value', ['parent.macrocounty', 'parent.macrocounty_a'])); | ||
t.deepEquals(actual.query.function_score.query.filtered.query.bool.should[6], individualLayer('region', | ||
t.deepEquals(actual.query.function_score.query.bool.should[6], individualLayer('region', | ||
'coarse country value', ['parent.region', 'parent.region_a'])); | ||
t.deepEquals(actual.query.function_score.query.filtered.query.bool.should[7], individualLayer('macroregion', | ||
t.deepEquals(actual.query.function_score.query.bool.should[7], individualLayer('macroregion', | ||
'coarse country value', ['parent.macroregion', 'parent.macroregion_a'])); | ||
t.deepEquals(actual.query.function_score.query.filtered.query.bool.should[8], individualLayer('dependency', | ||
t.deepEquals(actual.query.function_score.query.bool.should[8], individualLayer('dependency', | ||
'coarse country value', ['parent.dependency', 'parent.dependency_a'])); | ||
t.deepEquals(actual.query.function_score.query.filtered.query.bool.should[9], individualLayer('country', | ||
t.deepEquals(actual.query.function_score.query.bool.should[9], individualLayer('country', | ||
'coarse country value', ['parent.country', 'parent.country_a'])); | ||
@@ -366,3 +366,3 @@ | ||
t.equals(filter_views_called, 8); | ||
t.deepEquals(actual.query.function_score.query.filtered.filter.bool.must, expected_filter); | ||
t.deepEquals(actual.query.function_score.query.bool.filter.bool.must, expected_filter); | ||
t.end(); | ||
@@ -369,0 +369,0 @@ |
@@ -141,4 +141,4 @@ var StructuredFallbackQuery = require('../../layout/StructuredFallbackQuery'); | ||
t.false(actual.query.function_score.query.filtered.query.bool.should[0].bool.hasOwnProperty('boost')); | ||
t.false(actual.query.function_score.query.filtered.query.bool.should[1].bool.hasOwnProperty('boost')); | ||
t.false(actual.query.function_score.query.bool.should[0].bool.hasOwnProperty('boost')); | ||
t.false(actual.query.function_score.query.bool.should[1].bool.hasOwnProperty('boost')); | ||
t.end(); | ||
@@ -229,3 +229,3 @@ | ||
t.equals(filter_views_called, 8); | ||
t.deepEquals(actual.query.function_score.query.filtered.filter.bool.must, expected_filter); | ||
t.deepEquals(actual.query.function_score.query.bool.filter.bool.must, expected_filter); | ||
t.end(); | ||
@@ -232,0 +232,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
273996
7983
519