Skip to content

Instantly share code, notes, and snippets.

@grantr
Created September 21, 2011 23:20
Show Gist options
  • Select an option

  • Save grantr/1233599 to your computer and use it in GitHub Desktop.

Select an option

Save grantr/1233599 to your computer and use it in GitHub Desktop.
elasticsearch indexing chef
curl -XPUT localhost:9200/_river/couch/_meta -d '{
"type" : "couchdb",
"couchdb" : {
"host" : "localhost",
"port" : 5984,
"db" : "chef",
"filter" : null,
"script": "ctx._type = ctx.doc.chef_type"
},
"index" : {
"index" : "chef",
"bulk_size" : "100",
"bulk_timeout" : "10ms"
}
}'
curl "127.0.0.1:9200/chef/node/_count?q=automatic.lsb.release:11.04&pretty=true"
{
"count" : 1,
"_shards" : {
"total" : 5,
"successful" : 5,
"failed" : 0
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment