Created
May 28, 2013 11:20
-
-
Save AlexMocioi/5662067 to your computer and use it in GitHub Desktop.
Reindex views from all design docs, couch db
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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