Open papahmsolo opened 6 years ago
The way it works at the moment is that it puts your design document into Cloudant the queries the first view (MapReduce) view to see if indexing is complete. If you only have Cloudant search views then you'll get an error (as your previous issue stated). If you have a mix of MapReduce and Search, then it'll only check the MapReduce view, but that should be a good indicator that all the views in the design document are built.
You could add a dummy MapReduce view that never emits anything?
{
views: {
dummy: {
map: "function(doc) { }",
}
}
...
}
?
We tend to separate views and search indexes and store them in the different design docs. So I'm trying to understand whether couchmigrate gonna work with design docs that have only search indexes and no views in it and deploy it safely according to "Move and Switch" strategy or I'll need to patch couchmigrate for that.
Yes, adding dummy view could do the trick, but it's a little bit 'ugly'. I'm storing all the design docs formatted under version control and export them as modules so I'd rather not add any redundant code to the repository.
Thanks for replying, I appreciate it!
It should be possible to do the same trick with only search indicies but it would require a change to couchmigrate. If you patch before I do, a PR would be appreciated ;)
Does couchmigrate work with Cloudant search indexes? As I can see form the code, when migrating design docs with
views
, couchmigrate wait until the view is completely built. According to Cloudant docs: https://console.bluemix.net/docs/services/Cloudant/guides/design_document_management.html#multiple-views-in-the-same-design-documentSo my question is: would couchmigrate support search indexes migration out of the box? Or respective code should be added to check whether search index is completely built, in order to safely migrate search index? I know this tool is
couchmigrate
, notcloudantmigrate
:slightly_smiling_face:, but I'm curious to know this as I'm using it for deployments to Cloudant. Thanks!