-
Notifications
You must be signed in to change notification settings - Fork 79
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Geo search #444
Comments
@rpostulart, if you're using AppSync client, you can do geo-related queries with Elasticsearch as your data source. Might take a couple more steps than your regular DynamoDb setup but it's not too complicated. There's a tutorial here: https://goo.gl/Nbyrri for setting up your resolvers, and Elasticsearch's geo-query documentation is here: https://goo.gl/VHU4aH |
Elastic search is a workaround. We'd like native geo features, like Firebase is about to offer. Amplify is meant for mobile apps, and "get all things in this geo box" or "get all things in a radius around this geo point" is a very popular usage for mobiles apps. Please consider making this a high priority |
DynamoDB does not support geo queries, which is why that repo is in archive now. AppSync supports both DynamoDB as well as Elasticsearch which you can leverage in a single API and stream the data from DynamoDB to Elasticsearch indexes. That's why I'm not sure what the feature request is here since Amplify leverages the backend AWS services. Could you see if |
@undefobj, the 1. Support geo-types, i.e a new GraphQLObjectType, like AWSGeo? |
For new GraphQL scalar types that's best logged as a feature request to the AppSync service. I would recommend logging that here: https://forums.aws.amazon.com/forum.jspa?forumID=280&start=0 If there are enhancements needed to the GraphQL transformer it's best logged as a feature request in the Amplify CLI repo (as this repo is for the library): https://github.com/aws-amplify/amplify-cli @rpostulart does this match with your request? |
Why do you need ElasticSearch anyway for simple queries such as 'lt' 'ne' etc? DynamoDB supports these by itself. Is this just a away to force users to use and pay for ES even when not necessary? Anyway, you can now do a Float lat and Float lon and do box queries by havin lat and lat lt and lon gt and lon lt, but come on... Also it fails at poles or if you need large boxes or.... Anyway you shouldn't have to be a spherical geometry expert to do mobiles apps, that's what libs are for (although basic knowledge is still a must IMHO) |
@undefobj |
@undefobj I will check asap and let it know here. |
@doom777 you can use However these will just use DynamoDB itself and at scale these filtering techniques may be less performant based on your data access pattern which is why Elasticsearch exists. The |
I checked and agree with @doom777 . ElasticSearch does not suits my use case. I believe that ElasticSearch is too heavily for this use case. Because I expect it will be a highly used mobile app. I don't want to spin up an instance for each request, I prefer a serverless solutions for example with Lambda. |
I may be wrong, but I don't think an ES instance is spun up on every request; I think it stays there permanently, possibly in a cluster. |
Sorry that's what I mean indeed! |
Right, so to be clear @rpostulart as in the link I posted above
This is probably good for prototyping & small apps, which is why we added this capability based on customer feedback. However, if your app takes off and your table gets very large this becomes less scalable and you'll want to leverage a purpose-built search engine like Elasticsearch which is why |
Ok thanks, then I will focus on that. |
At the very least AWS could offer great documentation on how to implement this common usw casr |
@doom777 what more documentation could we add here? I linked to the transformer documentation above, is more needed there? Or alternatively is something else specifically needed? |
Look, I need to do a "select all entity in this geo box" query. Please show me an AWS tutorial how to do it. This is a common enough case. |
An AppSync dev has confirmed that this feature is in the planning pipeline |
Thanks for the feedback @doom777. As noted at this time you need Elasticsearch with |
@undefobj the issue is less in making it dynamodb focused and dropping ES (although running an ES cluster is not very serverless) In general there is no support for geo in the Amplify/AppSync stack. No geo types, no query functions. |
To add, read https://medium.com/open-graphql/building-a-graphql-api-by-example-restaurant-reviews-part-4-geospatial-search-e0e0d9dc0329 for how to geo search with ES. |
@YikSanChan that link is about hacking AppSync to work with ES geo features. Specifically, an object with two |
@doom777 I like your proposal. Maybe a better way to propose this is to submit an RFC? |
Maybe one day DocumentDB will support geo indexes like normal MongoDB?... |
I have picked up this task again with Amplify and Elasticsearch this time. GEO searching is then still not an out of the box solution, these are just two seperate services and we need to put something in between to do geo searching. It would be still great if AWS can provide something with Amplify to do GEO search on Elasticsearch or Dynamodb. Are there some developments? @doom777 also asked for an update in the AWS forum. |
Is there maybe an update / progress about supporting GEO search / queries in dynamodb. I have it now up and running in a elasticsearch service (via amplify) which works great, but I also notice that it is very expensive while I am just have a few call per months. |
@kaustavghosh06 @undefobj @mikeparisstuff Is there maybe an update about geo support in aws amplify on top of dynamodb or more a kind of serverless elasticsearch implementation where you only pay if you query elastic. This, to decrease the heavy costs of the use of @searchable |
I looked at the new announcement of ultra warm and hoped this fulfill this need, but unfortunately not. Can we expect anything on this soon? |
What about something like this? https://read.acloud.guru/location-based-search-results-with-dynamodb-and-geohash-267727e5d54f |
I know, but I don't want to use a package that hardly is used or maintained. It has open issues older than 2 years :( |
Any updates / progress? |
Will this be on the roadmap soon or do we not need to hope for it and accept the current solution? |
++1 |
+1 |
5 similar comments
+1 |
+1 |
+1 |
+1 |
+1 |
So correct me if I'm wrong, but there are three necessary pieces for this...
Maybe starting with the simplest use-case would be a good PR:
Some more info: |
any simple solution for this issue? |
+1 |
Can this be closed in favor of Amplify's geo category - https://docs.amplify.aws/cli/geo/search/ ? |
Geo Search vs geospatial search? With amplify geo it is Not possible to listPlaces from DynamoDB which Are in the near of me right? |
Not from DynamoDB, but from Amazon Location Service. |
I guess its not that what here is needed. |
any updates here ? |
A solution: https://stefan-majiros.com/blog/geo-search-with-aws-amplify-cdk-and-appsync-custom-js-resolvers (related: aws-amplify/amplify-cli#13183) Thanks to @mikeparisstuff 👏🏼 |
At this moment there is no possibility to search via graphql / dynamodb certain records based on the longitude and latitude (geo) while there is a kind of library within AWS for this:
https://github.com/amazon-archives/dynamodb-geo
Can we make these functionalities also available via Amplify:
Box Queries: Return all of the items that fall within a pair of geo points that define a rectangle as projected onto a sphere.
Radius Queries: Return all of the items that are within a given radius of a geo point.
Basic CRUD Operations: Create, retrieve, update, and delete geospatial data items.
Easy Integration: Adds functionality to the AWS SDK for Java in your server application.
Customizable: Access to raw request and result objects from the AWS SDK for Java.
The text was updated successfully, but these errors were encountered: