-
Notifications
You must be signed in to change notification settings - Fork 97
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
How to limit or sort result of queryRadius function? #9
Comments
You can use the Eg you might have something like (untested!):
Note that in DynamoDB filtering is done after the data is retrieved but before it's sent to you, so this saves you a bit of bandwidth and computation but won't reduce the read units consumed. |
@rh389 It does not work |
doesn't work |
If can help someone, it's just a little mistake in the @rh389 answer. It missing a semicolon prefix for The correct example is:
I tried, and it works ;) |
@tibeoh filter expression works. Limit does not work |
Hi,
is there another way to limit the number of results returned by queryRadius? |
Hello - Is there a way to order the results by distance to the lat/lng point originally passed to the queryRadius function? For example, finding all the restaurants within a radius sorted by distance to the user? Thanks! |
@a3leggeddog There's no built-in way (PR would be welcome for this), but it'd be fairly straightforward to sort the results client-side. S2Utils has a Server-side isn't possible unfortunately because DynamoDB can't sort by a computed value. To those asking about |
Hello @rh389 How can i work with ProjectionExpression?I try like ProjectionExpression: "nameAtrribute" |
my table : { |
Hi @rh389 , by any chance, did you have time to work on the functionality to limit the results? Since |
Is it possible to limit or sort radius queries?
Here is my code:
The text was updated successfully, but these errors were encountered: