Skip to content

Instantly share code, notes, and snippets.

@smarj
Created May 23, 2017 16:23
Show Gist options
  • Save smarj/e9c9671dd3ecb5a4c7ecf6338a4cd3f5 to your computer and use it in GitHub Desktop.
Save smarj/e9c9671dd3ecb5a4c7ecf6338a4cd3f5 to your computer and use it in GitHub Desktop.
Fill two Solr-indexed buckets with timestamps
#!/bin/bash
for bucket in $(seq -f "stest%g" 2 2); do
for key in $(seq -f "s2key%g" 1 10000); do
cdate=`date`
curl -XPUT ${RIAK}/types/solr/buckets/${bucket}/keys/${key} -H "Content-Type: application/json" -d "{\"name_s\":\"my${key}\", \"timestamp_s\":\"${cdate}\"}"
done
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment