apache / nano

Nano is now part of Apache CouchDB. Repo moved to https://GitHub.com/apache/couchdb-nano

Home Page:https://github.com/apache/couchdb-nano

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Support for mango index creation

chrisfosterelli opened this issue · comments

Related to #329

To create mango indices to query on, you have to POST http://couchdb/dbname/_index. This isn't possible right now, since nano's insert changes the method to PUT if a document ID is provided.

A temporary workaround is to call the relax method directly, but a better long term solution would be if nano added support for mango index creation.

Something like this might work:

const couch = nano(url)
couch.use(db).mango.createIndex({ ... }, err => {
  // handle err
})

This repository has been merged into apache/couchdb-nano, please continue the discussion here