|
|
@ -18,7 +18,7 @@ function generate( params ){ |
|
|
|
query = queries.bbox ( centroid, { size: params.size, bbox: params.bbox } ); |
|
|
|
query = queries.bbox ( centroid, { size: params.size, bbox: params.bbox } ); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// add search condition to distance query
|
|
|
|
// add search condition to filtered query
|
|
|
|
query.query.filtered.query = { |
|
|
|
query.query.filtered.query = { |
|
|
|
'bool': { |
|
|
|
'bool': { |
|
|
|
'must': [{
|
|
|
|
'must': [{
|
|
|
@ -26,8 +26,7 @@ function generate( params ){ |
|
|
|
'query': params.input, |
|
|
|
'query': params.input, |
|
|
|
'fields': [ 'name.*' ] |
|
|
|
'fields': [ 'name.*' ] |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
}] |
|
|
|
]
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|