3

I want to make a GET request to Couch to retrieve documents. using the following URL:

http://CouchServer/database_name/_design/design_name/_view/viewName?keys=["4302"%2C"4152"%2C"58"%2C"3248"%2Cetc..]

Can I pass in several thousand view keys?

Is there a better way of retrieving several thousand docs in CouchDB?

Zach Smith
  • 8,458
  • 13
  • 59
  • 133

1 Answers1

4

There are upper limits on the length of a URL, which depends on both the client and server. Generally, it's not a problem, but I would recommend using a POST request instead, and putting those keys in the request body. (where you won't have the same limitations)

Dominic Barnes
  • 28,083
  • 8
  • 65
  • 90
  • 1
    More on multiple couch view keys: http://stackoverflow.com/questions/16763306/couchdb-query-view-with-multiple-keys-formating – Zach Smith Dec 24 '15 at 00:36