Opensearch 2.7 location search using @searchable through graphql

0

I'm developing a React Native app using the AWS Amplify GraphQL API. Whenever a user posts, I also capture their latitude and longitude. I'd like to use this data to identify and show other users within a 20-mile radius of that user. I discovered that OpenSearch can help with this, and by adding the @searchable directive to my GraphQL schema and executing 'amplify push', an OpenSearch domain was created for me.

However, I'm unsure of how to search based on the location and specify the radius. Most examples I've found online pertain to ElasticSearch and are not compatible with the version of OpenSearch I'm using, which is 2.7.

Any guidance on this would be greatly appreciated.

没有答案

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则