Questions tagged [couchdb-mango]

Simplified query language interface for Apache CouchDB, inspired by MongoDB, and made available on Cloudant service first, and then on Apache CouchDB 2.0.

"Mango" is a MongoDB inspired query language interface for Apache CouchDB. It is designed to provide users a more natural conversion to Apache CouchDB.

It is worth noting that it enables the creation of indexes (a.k.a. 'views'), without having to implement explicitly a map and a reduce functions.

The endpoint added is for the HTTP-URI pattern /dbname/_query and has the following characteristics:

  • the only HTTP method supported is POST,
  • the request Content-Type must be application/json,
  • the response is a single JSON object or array that matches to the single command or list of commands that exist in the request.

Reference: https://github.com/cloudant/mango

92 questions
1
vote
1 answer

Pouchdb-find docs from the last 30 days

I'm trying to perform a $gte query on a PouchDB index I've created. The query doesn't error but returns an empty array when there should be documents that match the clause. The idea is to get all docs that have timestamps from the last 30 days. The…
Mark
  • 816
  • 1
  • 9
  • 27
1
vote
1 answer

Substring match on a field in json index

I want to be able to match a substring using a JSON index, but I can't seem to work out how to do it. I have a record in the data with a data.name property of A SIGN DESIGN PTY. LTD.. My index is defined as follows: db.index({ name:…
simon
  • 933
  • 1
  • 9
  • 17
1
vote
1 answer

Cloudant to CouchDB

We are developing an application which uses Cloudant as database, which is a variant of Couchdb. Cloudant started to become a bit expensive for us also not reliable because of the last issues. We have lost our connection to DBs for one day. So we…
iboware
  • 977
  • 1
  • 12
  • 25
1
vote
1 answer

Should I use selector or views in Cloudant?

I'm having confusion about whether to use selector or views, or both, when try to get a result from the following scenario: I need to do a wildsearch for a book and return the result of the books plus the price and the details of the store branch…
kkurni
  • 15
  • 1
  • 2
1
vote
1 answer

index and query items in an array with mango query for cloudant and couchdb 2.0

I have the following db structure: {"_id": "0096874","genre": ["Adventure","Comedy", "Sci-Fi" ]} {"_id": "0099088","genre": ["Comedy", "Sci-Fi", "Western"]} and like to query it like I could do in mongodb db.movies.find({genre: {$in:…
Andrej
  • 326
  • 3
  • 7
0
votes
1 answer

Registration response error in network tab

Hii I am trying to create a basic application with features of user registration and login in that, I created node js + express server and connected mango db too here in the registration form user input details like name email and password are…
0
votes
1 answer

couchdb : implement joins and views

I need to get below Result by joining Person and Department using CouchDB views and joins. How can this be achieved? Person: { name: 'Parnika', city: 'Delhi', dept: 'DevOps' } Department: { name: 'DevOps', city:…
0
votes
1 answer

Couchdb view search by numeric key

I have couchdb setup to have documents like below { "_id": "id", "_rev": "rev", "docType": "CLAIM", "createDate": 1633074806, "customerClaimNumber": "CCN101", "claimID": "CLID101" } Requirement is to have claims…
0
votes
1 answer

How can i improve the execution time of my CouchDB query?

I am storing a simple class consisting of the following data in my CouchDB. The Definition class just contains a list of points and additional basic data. public class Geometry : CouchDocument { public Guid SyncId { get; set; } public…
Peter
  • 135
  • 2
  • 13
0
votes
1 answer

Unable to insert large document in couchDB

I am unable to upload large documents in couchDB. I am using Node.js to upload with help of ActiveMQ. Small documents are uploading. I tried to upload a document which is 30 MB, but it failed with the following exception: (node:28)…
0
votes
1 answer

Mango Query + Apache CouchDB 3.x.x - sort array by property from array

I have following docs { "_id": "products:info", "_rev": "3-47add0ce8ecbcb2c4c7dfefae83c02cd", "created": "01-26-2022", "products": [ { "brand": "MSI", "title": "Summit e16", "sku": "1000121" }, { "brand":…
Pasupathi Rajamanickam
  • 1,982
  • 1
  • 24
  • 48
0
votes
1 answer

How to find document in CouchDB where document has an array that contains a specific string?

I am just getting started working with CouchDB. We have a database where the documents look like: "_id": "43538c8409dd", "_rev": "123", "audit": false, "members": { "users": [ { "dn": "cn=newuser1,ou=people,dc=foo,dc=com", …
user555303
  • 1,146
  • 3
  • 20
  • 44
0
votes
1 answer

how to solve Couch db conflict while replicating database to server to local

we have couch server to local and local to server replication. after creating or updating a record for someday the collection will be in updated state after one or two day some collections will be updated previous state this causing conflict in the…
0
votes
1 answer

PouchDB-find automatically building selectors from variable input

I am looking for a way to adapt query fields in the db-find selector. I need this because filters access different fields which may or may not be active all the time. I have tried two options, but none of them work: In the first option I tried to…
Yuehai
  • 1,165
  • 1
  • 10
  • 20
0
votes
1 answer

How to write a mango filter on the size of an array?

I would like to find documents with a mango query by specifying the minimal and maximal size of an array property. Given a document with an array property customers. I'd like to be able to find all documents with the number of customers between 10…
Leevi L
  • 1,538
  • 2
  • 13
  • 28