Browse Source

increase search radius to 500km

pull/156/head
Peter Johnson 10 years ago
parent
commit
ce611fd933
  1. 7
      query/reverse.js
  2. 4
      test/unit/query/reverse.js

7
query/reverse.js

@ -9,7 +9,12 @@ function generate( params ){
lon: params.lon lon: params.lon
}; };
var query = queries.distance( centroid, { size: params.size || 1, sort: true } ); var query = queries.distance( centroid, {
size: params.size || 1,
sort: true,
distance: '500km'
});
query.sort = query.sort.concat( sort( params ) ); query.sort = query.sort.concat( sort( params ) );
if ( params.categories && params.categories.length > 0 ) { if ( params.categories && params.categories.length > 0 ) {

4
test/unit/query/reverse.js

@ -78,7 +78,7 @@ module.exports.tests.query = function(test, common) {
'must': [ 'must': [
{ {
'geo_distance': { 'geo_distance': {
'distance': '50km', 'distance': '500km',
'distance_type': 'plane', 'distance_type': 'plane',
'optimize_bbox': 'indexed', 'optimize_bbox': 'indexed',
'_cache': true, '_cache': true,
@ -139,7 +139,7 @@ module.exports.tests.query = function(test, common) {
'must': [ 'must': [
{ {
'geo_distance': { 'geo_distance': {
'distance': '50km', 'distance': '500km',
'distance_type': 'plane', 'distance_type': 'plane',
'optimize_bbox': 'indexed', 'optimize_bbox': 'indexed',
'_cache': true, '_cache': true,

Loading…
Cancel
Save