1

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?

wheaties
  • 35,646
  • 15
  • 94
  • 131

2 Answers2

2

You need to copy the Production design document back to development (Copy to Dev button under Production Views) and then make the changes to the development view, test then when happy click Publish on the development view.

This is all documented under Development and Production Views in the Admin guide, including the intended usage model.

DaveR
  • 9,540
  • 3
  • 39
  • 58
0

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.

wheaties
  • 35,646
  • 15
  • 94
  • 131