Search code examples
javapythoncommand-linecouchbasecouchbase-view

Couchbase: Add View to existing Design Document


I can query the views of a design document. I can create a brand new design document. I can delete a design document. I can add a view to a design document I'm in the process of creating but...

How do you add a view to an already existing design document without going through their web UI? Is it even possible or do you always have to create a brand new design doc just to modify it.

For reference, I've looked at the "couchbase-cli" tool, the Python SDK, the Java SDK and even the REST API itself. Nowhere have I found a means of adding a view to a design document and persist that view in Couchbase without having to create a design document. Did I miss something from the documentation?


Solution

  • So it appears after watching how their Web UI console works, that they're essentially reusing the "create a design document," i.e. the PUT command, to overwrite the existing design document. I have no idea how this would work on a production machine while it is running or the implications of such actions. The documentation, for a commercial product, in this regards is lacking.