|
|
@ -84,6 +84,7 @@ function generate( params ){ |
|
|
|
admin_fields.push('admin0', 'alpha3'); |
|
|
|
admin_fields.push('admin0', 'alpha3'); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (params.parsed_input.regions) { |
|
|
|
var input_regions = params.parsed_input.regions.join(' '); |
|
|
|
var input_regions = params.parsed_input.regions.join(' '); |
|
|
|
if (admin_fields.length === 4 && input_regions !== params.input) { |
|
|
|
if (admin_fields.length === 4 && input_regions !== params.input) { |
|
|
|
if (params.parsed_input.admin_parts) { |
|
|
|
if (params.parsed_input.admin_parts) { |
|
|
@ -93,6 +94,7 @@ function generate( params ){ |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// add search condition to distance query
|
|
|
|
// add search condition to distance query
|
|
|
|
query.query.filtered.query.bool.must.push({
|
|
|
|
query.query.filtered.query.bool.must.push({
|
|
|
|