Skip to content
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

Sort order by index? #20

Open
uhop opened this issue Jun 8, 2015 · 1 comment
Open

Sort order by index? #20

uhop opened this issue Jun 8, 2015 · 1 comment

Comments

@uhop
Copy link

uhop commented Jun 8, 2015

I am selecting objects by some criteria, and want to return them in a reverse chronological order. How to do that? I don't see how I can specify a field or an index for that.

@jdduncan
Copy link
Contributor

Query can sort for you, but only in the case of an ordered index scan. So if you have an index on the timestamp, and that index is the one being used to execute the query, then you can add { "order" : "desc" } to the queryParameters and they will be sorted for you. Otherwise you have to do the sorting yourself.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants