Austin Troth
Posts: 0
Joined: Wed Feb 26, 2014 4:54 am

Distinct Query with a limit

I am using a query to locate a distinct value among a list. I can get that part to work. But I only want to retrieve the top 5 results. On my other queries I just use the Limit request but that does not seem to work on the district query. Is there something I am doing incorrectly or is this not possible? Thanks

Image

Image

Serhii Kulibaba
Posts: 150
Joined: Tue Aug 27, 2013 1:47 pm

Distinct Query with a limit

Hello,

It is a limitation of the mongoDB: it is impossible to use limit/offset parameters in distinct requests: http://stackoverflow.com/questions/16...

Please use that filtration on the Server Code:
https://docs.appery.io/reference#serv...
In that case you'll be able to get limit amount of it's values in the app

Return to “Issues”