Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to get all documents from couchdb using lightcouch api in java

Tags:

java

couchdb

Is there any way to get all documents from a db rather than specifying an id and retrieving a single document using lightcouch api in Java.Presently i am using the method

JsonObject json = dbClient.find(JsonObject.class, "some-id") to retrieve a single document.

Thanks in advance.

like image 342
monil Avatar asked May 01 '12 04:05

monil


1 Answers

How about the _all_docs view? That will return a list of all the docs in the database. Or if you include include_docs=true to the request, you will also get the contents of the documents.

like image 182
Dusty Campbell Avatar answered Oct 20 '22 17:10

Dusty Campbell