[#111,elasticsearch,geofilter][xs]: work out that what ES docs describe as distance_unit field is actually called unit.

This commit is contained in:
Rufus Pollock 2012-06-16 18:27:59 +01:00
parent 92b061ef00
commit b64daea1a7
2 changed files with 2 additions and 1 deletions

View File

@ -124,6 +124,7 @@ this.recline.Backend.ElasticSearch = this.recline.Backend.ElasticSearch || {};
} else if (filter.type === 'geo_distance') {
out.geo_distance[filter.field] = filter.point;
out.geo_distance.distance = filter.distance;
out.geo_distance.unit = filter.unit;
}
return out;
},

View File

@ -424,7 +424,7 @@ my.Query = Backbone.Model.extend({
},
geo_distance: {
distance: 10,
distance_unit: 'km',
unit: 'km',
point: {
lon: 0,
lat: 0