weaviate-python-client icon indicating copy to clipboard operation
weaviate-python-client copied to clipboard

Implement REST conversion of `within_geo_range`

Open tsmith023 opened this issue 1 year ago • 3 comments

Currently, a filter created using the within_geo_range method is not mapped appropriately when converted into the where filter syntax expected by the REST and GQL APIs, as here

As a result, any aggregation queries that filter on the geo range fail

tsmith023 avatar Mar 05 '24 12:03 tsmith023

Do you mind pointing me towards the "within_geo_range" method?

saireddythfc avatar Mar 23 '24 16:03 saireddythfc

Hi @saireddythfc, the within_geo_range method is here and the parsing into the expected REST syntax/schema happens here

LMK how you get on! Cheers 😁

tsmith023 avatar Apr 02 '24 09:04 tsmith023

I took a stab at this and I and printing out the graphql query that gets generated.

@tsmith023

where: {path: ["location"] operator: WithinGeoRange valueGeoRange: { geoCoordinates: { latitude: 0.0 longitude: 180.0 } distance: { max: 99999999.0 }}}

When I aggregate by total count I am getting no results and no errors are being presented. I run within_geo_range with the same lat, long parameters I get numerous results from my test data.

Might be a little stuck here as it is my first time working with graphql queries and such.

jksnxd avatar Jun 22 '24 03:06 jksnxd