qdrant-dotnet icon indicating copy to clipboard operation
qdrant-dotnet copied to clipboard

Geo filter not working

Open valdtechsecurity opened this issue 1 year ago • 1 comments

I am using the following code to filter and it does not filter by the GeoRadius. If I filter by key everything goes well

var expected1 = new Filter { Must = { new Condition { Field = new FieldCondition { Key = "Location", GeoRadius = new GeoRadius { Radius = 10000, Center = new GeoPoint { Lon = (double)userPromtInfo.Longitud, Lat = (double)userPromtInfo.Latitud } } } }, } };

In the quadrant documentation the filter is like this

{ "key": "location", "geo_radius": { "center": { "lon": 13.403683, "lat": 52.520711 }, "radius": 1000.0 } }

When you run the code what you get is

"{ ""key"": ""Location"", ""geoRadius"": { ""center"": { ""lon"": -4.4216, ""lat"": 36.7213 }, ""radius"": 10000 } }"

There may be a problem in which one key is geoRadius and the other geo_radius?

valdtechsecurity avatar Jun 13 '24 22:06 valdtechsecurity

@valdtechsecurity the second example looks like the .ToString() representation of FieldCondition proto used in the gRPC API. This representation is provided for diagnostic purposes only, and it shouldn't be expected to match what the qdrant JSON HTTP API expects, which I think is what your first example is showing.

russcam avatar Jul 23 '24 08:07 russcam