Is there any way to return all data from couchbase view

I wrote a Couchbase view and I am requesting this view from Python. Instead of a complete set of returned data, it returns only the first 10 elements.

I do not want pagination, instead of pagination I want the whole data set. Is there any way to do this?

Below is my code:

function (doc, meta) { if (doc.type == "folder" && doc.location) { emit(doc.location, meta.id); } } 

And here is the Python code that I wrote to run the request:

 view_endpoint = "_design/restViews/_view/"+viewName+"?key=%22"+key response = requests.get(view_url + view_endpoint).json() return response 
+4
source share
1 answer

A trusted source says:

When requesting viewing results, you can select several parameters, limit, organize, and otherwise control the execution of the presentation and the returned information. When referring to a view without specifying any parameters, the view will produce results that correspond to the following: Full specification of the view, i.e. all documents are potentially displayed in accordance with the definition of the type. Limited to 10 items in the admin console, unlimited through the REST API . The return function used if defined in the view. Elements are sorted in ascending order (using UTF-8 comparison for strings, natural number order)

You can add parameters to the request before submission. One of them:

limit: numeric Limit - the number of documents returned to the specified number.

Good luck. :)

+1
source

All Articles