Meteor-Community-Packages/meteor-schema-index

update to rawCollection().createIndex() over meteor _ensureIndex

Closed this issue · 3 comments

Hey there,

Should we update to use the documented rawCollection().createIndex() rather than the undocumented meteor method ._ensureIndex()?

@aldeed If you can update, it would be great. It would be a small change.

@Pushplaybang @faisalhasnain Is there some reason to do this now other than because relying on private props is discouraged in general? I ask because this works, has always worked, and will likely work for a long time, and as far as I can tell, the documented functions are not synchronous.

See https://github.com/meteor/meteor/blob/4a97d0551fbbc9827ddd101b162322dc03c5905d/packages/mongo/mongo_driver.js#L787-L807

I would like to change it but I'd just have to reimplement that Futures code.

Updating to use the official Metoer API.