Skip to content

Instantly share code, notes, and snippets.

@AlexMocioi
Created May 28, 2013 11:20
Show Gist options
  • Save AlexMocioi/5662067 to your computer and use it in GitHub Desktop.
Save AlexMocioi/5662067 to your computer and use it in GitHub Desktop.
Reindex views from all design docs, couch db
VIEWS=`curl --request GET -s "http://$server:5984/$database/_all_docs?startkey=%22_design/%22&endkey=%22_design0%22" | awk '{FS="[\":\"]+";if($2 == "id") print $3}'`
for VIEW in $VIEWS
do
#echo "index view: ${VIEW}"
echo "curl -X GET -s \"http://$server:5984/$database/_design/{$urls}\" >/dev/null 2>&1" >> $filename
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment