Model.cleanIndexes()

Parameters
  • [callback] «Function» optional callback
Returns:
  • «Promise,undefined» Returns undefined if callback is specified, returns a promise if no callback.

Deletes all indexes that aren’t defined in this model’s schema. Used by syncIndexes().

The returned promise resolves to a list of the dropped indexes’ names as an array