couchdb-2.0

CouchDB: This database failed to load / No DB shards could be opened (logged in as admin)

廉价感情. 提交于 2020-01-01 19:15:43
问题 I am trying to regain access to my databases stored in CouchDB, but the error This database failed to load. gets shown instead of the databases (see attachments). I started seeing all of these errors at once It be some user rights misconfiguration (1. The error This database failed to load. is normal, when lacking privileges, 2. The actions to delete or replicate a DB are missing). However, I am logged as admin. Can you help me find the root cause of the error? Simple PUT and DELETE requests

CouchDB: This database failed to load / No DB shards could be opened (logged in as admin)

随声附和 提交于 2020-01-01 19:15:13
问题 I am trying to regain access to my databases stored in CouchDB, but the error This database failed to load. gets shown instead of the databases (see attachments). I started seeing all of these errors at once It be some user rights misconfiguration (1. The error This database failed to load. is normal, when lacking privileges, 2. The actions to delete or replicate a DB are missing). However, I am logged as admin. Can you help me find the root cause of the error? Simple PUT and DELETE requests

Couchdb, Mango queries and Indexes

≡放荡痞女 提交于 2019-12-30 07:14:14
问题 I use Mango queries with Couchdb when users want to search the database. They can search by multiple fields in the document. To simplify I have a document with three fields all of which can be searched to find the document. FieldOne: cow FieldTwo: pig FieldThree: dog When creating a mango index for the query what fields should I use? Should I create and index with multiple fields? Does the order matter? There are also three different document types (A, B C) defined in a field. I only need to

Python with CouchDB 2.0

醉酒当歌 提交于 2019-12-11 06:43:44
问题 I have CouchDB 2.0 server. I need to create, delete, get, update and query the databases via python. On 1.6 version there was a couchdb-python lib. What is the best option here ? Work with the couchdb rest-api directly? 回答1: You also have [python-cloudant] and [couchdbkit] as well as a python module named simply couchdb , which has recent updates in 2018. Nice related gist: https://gist.github.com/marians/8e41fc817f04de7c4a70 Searching PyPI finds a lot https://pypi.org/search/?q=couchdb 来源:

Setup Apache CouchDB screen re-appears on container restart

好久不见. 提交于 2019-12-11 05:41:43
问题 I have CouchDB v2.3 running using the official Docker image. I've configured the database as a Single Node using Fauxton. The /data directory is mount to a local directory. When I'm restarting the container, the databases are still there. So the volume binding works as expected. Now, everytime I'm restarting the container and I navigate to the 'Setup' tab, it looks like CouchDB did not remember I've configured it as a Single Node. I keep seeing the following screen after restarting the image

Can you implement document joins using CouchDB 2.0 'Mango'?

我的未来我决定 提交于 2019-12-11 01:58:43
问题 From previous work on CouchDB 1.6.1, I know that it's possible to implement document joins in a couple ways: For example, with a simple schema of 'students and 'courses : // Students table | Student ID | Student Name | XYZ1 | Zach // Courses table | Course ID | Student ID | COURSE1 | XYZ1 This SQL query: SELECT [Student Name], [Course ID] FROM Students RIGHT OUTER JOIN Courses ON Students.[Student ID] = Courses.[Student ID] Could be implemented in CouchDB 1.6 with a map function: // Map

How to count the documents returned by a Mango query

不羁岁月 提交于 2019-12-07 15:29:20
问题 I have a mango query: { "selector": { "age":{ "$eq": 22 } } } I want to know the number of documents that satisfy this criteria. I know we can use map reduce functions to achieve this, but is there any way to do this by using mango query like using some key like "count" in the query itself as we do for "sort", and "fields". I am firing mango query through rest client and I want the number of documents as the response of the query. 回答1: It is not really possible to retrieve the full number of

How to create a TEXT index in CouchDB 2.0?

痴心易碎 提交于 2019-12-07 06:04:10
问题 I'm reading this article https://cloudant.com/blog/mango-json-vs-text-indexes and I would like to create a TEXT index in my CouchDB In the Fauxton -> Mango Indexes page, I posted { "index": { "fields": [ { "name": "id_str", "type": "number" } ] }, "name": "doc_id", "type": "text" } ...but got a 503 error with the following message: {"error":"required index service unavailable","reason":"text"} I wasn't able to find even any related info in their documentation and I feel really lost now. So:

How to count the documents returned by a Mango query

久未见 提交于 2019-12-06 04:08:44
I have a mango query: { "selector": { "age":{ "$eq": 22 } } } I want to know the number of documents that satisfy this criteria. I know we can use map reduce functions to achieve this, but is there any way to do this by using mango query like using some key like "count" in the query itself as we do for "sort", and "fields". I am firing mango query through rest client and I want the number of documents as the response of the query. It is not really possible to retrieve the full number of documents by using the find function. By default _find is limited to 25 documents to be returned ( http:/

How to create a TEXT index in CouchDB 2.0?

浪尽此生 提交于 2019-12-05 11:31:40
I'm reading this article https://cloudant.com/blog/mango-json-vs-text-indexes and I would like to create a TEXT index in my CouchDB In the Fauxton -> Mango Indexes page, I posted { "index": { "fields": [ { "name": "id_str", "type": "number" } ] }, "name": "doc_id", "type": "text" } ...but got a 503 error with the following message: {"error":"required index service unavailable","reason":"text"} I wasn't able to find even any related info in their documentation and I feel really lost now. So: How to create a TEXT index in CouchDB? Where can I find a decent introduction to indexes in CouchDB?