Skip to content

Instantly share code, notes, and snippets.

@mzafer
mzafer / _02_mongodb-river-author.json
Created May 8, 2013 17:25
Extension of the scripts to test issue #64 (https://github.com/richardwilly98/elasticsearch-river-mongodb/tree/master/resources/issues/64) to add script for deletion of document is state is changed. The changes done are _02_mongodb-river-author.json -> Added "script" to delete the document if state == "INACTIVE" _03-import-document.js -> Added "…
{
"type": "mongodb",
"mongodb": {
"db": "mydb",
"collection": "authors",
"script": "if( ctx.document.state == 'INACTIVE' ) { ctx.deleted = true; }"
},
"index": {
"name": "authors",
"type": "author"
@mzafer
mzafer / Global.scala
Created September 13, 2012 03:21
Salat DateTime json deserialization issue
import play.api._
object Global extends GlobalSettings {
override def onStart(app: Application) {
com.mongodb.casbah.commons.conversions.scala.RegisterJodaTimeConversionHelpers()
/*import com.mongodb.casbah.commons.conversions.scala._
RegisterJodaTimeConversionHelpers()
RegisterConversionHelpers()*/