Vector Search $filter on "location" with geospatial index

Hi there, was wondering if it is possible to $filter on a Vector Search query using a geospatial index. My use case is as follows:

I have a collection, images, that stores image embeddings. Each embedding also has a geographic location associated with it. When I perform my vector search using a target image’s embedding, I only want to search for images that fall within a certain radius of my target image’s location.

For example, if my target image has coordinates mapping it to New York, I only want to search on images in my collection that fall within a 50 or 60 mile radius of this location.

Is this possible? I see in the Vector Search documentation that the $filter field “matches only BSON boolean, string, and numeric values”. It would be amazing if this could be extended to other indexed fields, like a geospatial index - but for now it seems like a custom solution is necessary.

Any ideas?

Hello @Lucas_Lind, apologies for the delayed response here.

Currently it’s not possible to filter on geospatial data in the new $vectorSearch aggregation stage.

But you can use geoSpatial filters in Atlas Search in a filter along with the knnBeta operator. There is a “filter” example on the page here and you could use geoSpatial filters with this solution.