You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@couchdb.apache.org by carlosduclos <gi...@git.apache.org> on 2017/03/17 13:59:38 UTC

[GitHub] couchdb-nano issue #27: Support for mango index creation

GitHub user carlosduclos opened an issue:

    https://github.com/apache/couchdb-nano/issues/27

    Support for mango index creation

    [Original issue](https://github.com/dscape/nano/issues/330)
    
    __chrisfosterelli__
    Related to #dscape/nano/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:
    ```javascript
    const couch = nano(url)
    couch.use(db).mango.createIndex({ ... }, err => {
      // handle err
    })
    ```

----

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---