I’m trying to filter places by geoCoordinates but this code is getting an error
where_filter = {
'operator': 'WithinGeoRange',
'valueGeoRange': {
'geoCoordinates': {
'latitude': 10.8064,
'longitude': 106.7323,
},
'distance': { 'max': 2000 }
},
'path': ['geoLocation']
}
response = (
client.query
.get("Place", ["postgresId", "address"])
.with_additional('id')
.with_where(where_filter)
.do()
)
response
The error is as follows:
{'errors': [{'locations': [{'column': 83, 'line': 1}],
'message': 'Syntax Error GraphQL request (1:83) Expected Name, found String "geoCoordinates"\n\n1: {Get{Place(where: {path: ["geoLocation"] operator: WithinGeoRange valueGeoRange: {"geoCoordinates": {"latitude": 10.8064, "longitude": 106.7323}, "distance": {"max": 2000}}} ){postgresId address _additional {id }}}}\n ^\n',
'path': None}]}
I’m not sure if I’m missing anything, or does Weaviate python client not support geoLocation filtering? In the documentation that I saw, the python code uses raw query instead (GraphQL - Conditional filters | Weaviate - vector database)