Permalink
Browse files

Elasticsearch geo_bounding_box filter expects top_left (northwest) an…

…d bottom_right (southeast).

Haystack's elasticsearch backend is passing northeast and southwest coordinates instead.
  • Loading branch information...
Danny Han
Danny Han committed Oct 20, 2012
1 parent 13e5a49 commit 65eb104ecdee61da69163f4c1c354860b9616aca
Showing with 2 additions and 2 deletions.
  1. +2 −2 haystack/backends/elasticsearch_backend.py
@@ -410,11 +410,11 @@ def build_search_kwargs(self, query_string, sort_by=None, start_offset=0, end_of
within['field']: {
"top_left": {
"lat": max_lat,
- "lon": max_lng
+ "lon": min_lng
},
"bottom_right": {
"lat": min_lat,
- "lon": min_lng
+ "lon": max_lng
}
}
},

0 comments on commit 65eb104

Please sign in to comment.