Partially implemented Collection.createIndex method.