Searching geolocations by distance using GAE Search API (1.7.6) returns zero results always...
I build the following query:
distance(geoLocation, geopoint(27.241131, -82.464445)) < 16093 /* 10 Miles in meters */
Results are always zero although I have geopoints within the distance. For instance my search origin is in this case
lat: 27.241131, lgn: -82.464445 and one of the geopoints within the range is
When I calculate the distance using google maps api v3 like this:
google.maps.geometry.spherical.computeDistanceBetween ( new google.maps.LatLng(27.241131, -82.464445), new google.maps.LatLng(27.233247, -82.48819800000001)) = 2509.46
This is how I store geopoints along with other fields
dictFields =  dictFields.append(search.AtomField(name = 'zipcode', value = k.get('zipcode'))) geopoint = search.GeoPoint(float(lat), float(lng)) dictFields.append(search.GeoField(name = 'geoLocation', value = geopoint))
Later I do
search.Document(doc_id = document_id, fields = dictFields)
What is wrong here? I know that Search works because it returns results when I search by other fields different than geopoints.
Search id done like this:
options = search.QueryOptions(limit=1000, returned_fields=['geoLocation', 'zipcode']) query = search.Query(query_string=query_str, options=options)
query_str = distance(geoLocation, geopoint(27.241131, -82.464445)) < 16093
I'm testing using the geopoint stored by the index and get search.SearchResults(number_found=0L). Question: Is this suppose to work in the dev environment?
Help is appreciated!!!!!