Cloudant connector plugin update: manage Design documents
Yesterday I was helping out Patrick Kwinten with some he had with my Cloudant Connector pluginon Slack. He asked also about the possibility to add or modify Design Documents, I found there foundation was already there.Design Documents
Design documents can be seen asthe schema in your Cloudant database, which specify what is in the view and how the ftSearch index is build.
Below is an example of a Design Document. As everything in Cloudant the syntax is JSON.
As I wrote before, the foundation was already laid in the plugin, the only I had to do was to expose them to the outside world. With this new methods you can programmatically create or update Design Documents.connector.getDocumentConnector().createDesignDocument(final Map<String, String> updates, final String designDocument) connector.getDocumentConnector().updateDesignDocument(final Map<String, String> updates, final String designDocument)
the name of the designDocument to create or updateClosing
Everything, including an updated ReadMe is in the BitBucket repository .
Thanks to Patrick for the great blogpost with boilerplate, where you can see the plugin in action.
When you need help with the plugin, let me know or reach out to me on Slack as Patrick did.
When you have feature request, please create an issue in the BitBucket Repository and I will have look if it will make it to the plugin.
本文标题：Cloudant connector plugin update: manage Design documents