Description
Hello,
I’m having an issue with the WithinGeoRange
operator for geospatial queries in my database.
Here is the query structure I’m using:
{
'operator': 'WithinGeoRange',
'valueGeoRange': {
'geoCoordinates': {
'latitude': coordinates["latitude"],
'longitude': coordinates["longitude"],
},
'distance': {'max': int(distance)}
},
'path': ['coordinates']
}
Here is a sample document in my database:
{
"properties": {
"coordinates": {
"latitude": 27.160555,
"longitude": 78.054596
},
"productId": "66ea"
}
}
When I query using the same latitude and longitude as the document (latitude: 27.160555
, longitude: 78.054596
) and set the max
distance to 1000
, I don’t get any results.
What I’ve Tried:
- Verified that the coordinates in the query match the document.
- Confirmed that the distance is correctly calculated in meters.
- Checked for typos in the
path
parameter.
Still, the query doesn’t return the document even though it should fall within the range.
Questions:
- Does the
WithinGeoRange
operator support this type of query, or am I missing something in the implementation? - Is there a specific distance metric or projection setting I need to configure?
- Could this be related to a bug, or am I misinterpreting how the geospatial query works?
Any help or pointers would be greatly appreciated!
Server Setup Information
- Weaviate Server Version:
- Deployment Method: Local docker image (http://cr.weaviate.io/semitechnologies/weaviate:1.27.2)
- Multi Node? Number of Running Nodes:
- Client Language and Version: Python Client 3.24.1
- Multitenancy?: