Questions tagged [couchdb-2.0]

Use couchdb-2.0 for questions specific to the 2.0 major release of CouchDB and its minor releases.

References

122 questions
10
votes
2 answers

How to count the documents returned by a Mango query

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…
QO23
  • 143
  • 1
  • 8
7
votes
1 answer

How to create a TEXT index in CouchDB 2.0?

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", …
Frederick Zhang
  • 3,593
  • 4
  • 32
  • 54
6
votes
2 answers

CouchDB indexes to connect the dots between documents

I have the following documents: { _id: "123", type: "project", worksite_id: "worksite_1" } { _id: "456", type: "document", project_id: "123" } { _id: "789", type: "signature", document_id: "456" } My goal is to run a query and to inevitably do a…
bryan
  • 8,879
  • 18
  • 83
  • 166
5
votes
0 answers

What are the limitations for a custom CouchDB _id field?

I'm going to implement my own unique _id fields generation algorithm in CouchDB 2.1 and I want to figure out how much I am limited. The only reference about _id I've found is this: _id (string) – Document ID Am I allowed to have an arbitrary long…
Tsagana Nokhaeva
  • 630
  • 1
  • 6
  • 25
5
votes
2 answers

Create Document in CouchDB 2.0 fauxton using Java

I created a default GWT project and trying to create a document in the database with a simple entry using CouchDB as my database. Previously we were using CouchDB 1.6 i.e futon as UI. Now, recently trying to use CouchDB 2.0 i.e Fauxton as UI.…
Vartika
  • 1,085
  • 3
  • 17
  • 43
4
votes
1 answer

enabling SSL for Hyperledger Fabric couchdb

I want to use couchDB(V. 2.3.1) with SSL enabled, so I added [ssl] part to /opt/couchdb/etc/local.d/docker.ini file as shown below: [ssl] port = 6984 enable = true cert_file = /etc/hyperledger/fabric/tls/server.crt key_file =…
4
votes
1 answer

How to replicate documents from one database to another database and delete documents on the original database when replication is complete

Problem I have a database of recordings recordingsDB sent from a client application which uses pouchDB. Each recording is it's own document. e.g. { "_id": "2019-10-20T04:51:22.744Z", "_rev": "1-53e73be51ea76f96e3cfde2de1502439", "locale":…
Eric
  • 795
  • 5
  • 21
4
votes
1 answer

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

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…
Peter G.
  • 7,816
  • 20
  • 80
  • 154
4
votes
1 answer

Couchdb, Mango queries and Indexes

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:…
R.Meredith
  • 184
  • 2
  • 10
4
votes
0 answers

What features are supported by CouchDB javascript engine

I want to make a validate_doc_update. What features are supported for this function by CouchDB? Can I use Array.find, Array.map, Object.keys and other functions like those? If latest version supports those features, which CouchDB version should I…
Vinz243
  • 9,654
  • 10
  • 42
  • 86
4
votes
1 answer

The _replicator database is not scalable or my design needs tweaking

I think it is important that I elaborate on where I am coming from so that you can understand my use case, please bear with me. Background: I’m looking to migrate my app from CouchDB 1 to 2 and this migration is going to take a decent amount of…
redgeoff
  • 3,163
  • 1
  • 25
  • 39
4
votes
0 answers

In CouchDB 2.0, why is last_seq on changes() different than update_seq on info()?

In CouchDB 2.0, I noticed that the database's info 'update_seq' property has the same number, but different text, than the changes feed 'last_seq' property. Why is that?
joeforker
  • 40,459
  • 37
  • 151
  • 246
3
votes
1 answer

Setup Apache CouchDB screen re-appears on container restart

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…
ndequeker
  • 7,932
  • 7
  • 61
  • 93
3
votes
0 answers

How to get details of changed document from _global_changes in CouchDB

I am listening to the changes from all the databases on my CouchDB instance using nano in my node.js application to follow the _global_changes database. const globalChanges = nano.use('_global_changes'); const feed = globalChanges.follow({ since:…
Adam D
  • 1,962
  • 2
  • 21
  • 37
3
votes
1 answer

Error: Cannot sort on field(s) "balance" when using the default index

I am trying to run a query like : query temp{ description: "Find bidder with highest balance" statement: SELECT org.dltlabs.auctionModel.Bidder WHERE (balance > _$balance) ORDER BY balance } I am running a query on…
1
2 3
8 9