meteor-feature-requests icon indicating copy to clipboard operation
meteor-feature-requests copied to clipboard

Automatic management of mongo indexes

Open sebakerckhof opened this issue 7 years ago • 2 comments

If all indexes for your mongo database are defined inside your meteor application (using _ensureIndex). It would be useful if Meteor could have an option (e.g. through a setting or envar) to automatically query and diff the indexes at server startup (and thus drop indexes that are no longer defined anywhere). Might be a bit tricky for 'text'-indexes.

sebakerckhof avatar Apr 09 '18 13:04 sebakerckhof

You probably want to use percolate:migrations for that behavior.

doctorpangloss avatar Apr 10 '18 05:04 doctorpangloss

@doctorpangloss Well, except for a locking mechanism, percolate:migrations doesn't do much, you would still need to record manage all indexes manually. This request is about doing an automatic diff / sync between requested and actual indexes.

sebakerckhof avatar Apr 10 '18 08:04 sebakerckhof