Reputation: 759
I have created a view and it contains thousands of records I want get only 10 or 20 at a time ,for this I tried to use http://localhost:5984/recipes/_design/recipes/_view/by_recipe?limit=2 which is not working ,Still it is giving me entire data.
How can I achieve this?
Upvotes: 0
Views: 215
Reputation: 467
It is better if you use the startkey and limit to avoid slow response in large number of documents. In the same URL above, you will find this. For example: http://127.0.0.1:5984/mybd/_design/myviews/_view/get?startkey="blabla1"&limit=2
Upvotes: 0
Reputation: 303
Maybe you need to use limit
in combination with skip
, according to these docs: https://wiki.apache.org/couchdb/HTTP_view_API
Upvotes: 1