Skip to content

Instantly share code, notes, and snippets.

@missinglink
Created June 20, 2013 16:43
Show Gist options
  • Select an option

  • Save missinglink/5824403 to your computer and use it in GitHub Desktop.

Select an option

Save missinglink/5824403 to your computer and use it in GitHub Desktop.
Example of mapping field names during a river update
$ curl -XPUT "localhost:9200/_river/mongoscriptfilter/_meta" -d'
{
"type": "mongodb",
"mongodb": {
"db": "testmongo",
"collection": "documents",
"script": "ctx.document.title = ctx.document.title_from_mongo; delete ctx.document.title_from_mongo;"
},
"index": {
"name": "testmongo",
"type": "documents"
}
}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment