I have a simple question, How should I retrieve the document ids of all documents from a given database in couchdb.
I have written this code which retrieves all the documents-
docs=CouchRest.get("http://localhost:5984/competency1/_all_docs?include_docs=true")
puts docs.to_json
The above code displays the entire details of the database.I want to be able to list only the document id's.
I really appreciate your help.
Thanks.
From HTTP Document API about retrieving all documents:
In other words, get
/competency1/_all_docs
without the?include_docs=true
part. This is the best solution for several reasons.limit
,startkey,
endkey` options.