code: function setupIndexFunctions (InstanceModel) {
    if (InstanceModel && InstanceModel.schema && InstanceModel.schema.indexes) {
      const indexes = InstanceModel.schema.indexes
      let v
      for (v in indexes) {
        if (indexes.hasOwnProperty(v)) {
          const path = indexes[v].path
          const name = indexes[v].name
          const fnName = 'findBy'.concat(inflection.camelize(inflection.underscore(name)))
          const indexFind = generateIndexFinder(InstanceModel, path, name)
          InstanceModel[fnName] = function () {
            return promisifyCall(this, indexFind, ...arguments)
          }
        }
      }
    }
  }
docs: /*!
  Sets up index query functions
  @param InstanceModel