richardwilly98/elasticsearch-river-mongodb — pull request #157 by bernd (2013-10-08 11:10:15+00:00)
Title: Add import_filter to MongoDBRiverDefinition.

This allows filtering of the initial import.

I noticed that the initial import ignores the defined filter in the MongoDBRiverDefinition. I first tried to feed the configured filter to `slurpedCollection.find()`, but that does not work because the oplog filter needs the `o.` prefix. And that does not work with the regular `find()` on the collection. So I created another filter option. (`import_filter`)

Not sure if you want to merge this as it is. Maybe it would be nicer to only have one filter definition that works for the initial import and the oplog filter. (by prepending the `o.` prefix automatically or something like that)

It works for me and helps me to filter the initial import so I wanted to share it.

Attention: I don't know Java, so please double check this code. ;)