aboekhoff/congomongo — pull request #84 by xavi (2012-08-12 14:49:00+00:00)
Title: adds support for sparse indexes to add-index!

I missed this for an app I'm working on, so I've added support for it, and a corresponding test.
http://docs.mongodb.org/manual/core/indexes/#sparse-index

MongoDB's ensureIndex accepts even more parameters (like background or dropDups) that drop-index! doesn't support yet. I thought that drop-index! could just pass the entire options map to the Java driver's ensureIndex method, so that CongoMongo could support all these new parameters and even future ones. This, however, would mean that the available parameters and their default values would not be explicitly visible in CongoMongo's Clojure code, which may not be a desirable thing, or at least is something that should probably be discussed first.

In any case, for the moment, this pull request adds support for sparse indexes without changing how add-index! handles parameters.