static async deleteByQuery(query, { refresh } = {}) {
    const { documents } = await global.kuzzle.internalIndex.deleteByQuery(
      this.collection,
      query,
    );

    await Bluebird.map(
      documents,
      (document) => this._instantiateFromDb(document)._afterDelete(),
      { concurrency: 10 },
    ); // limits the load on storage services

    if (refresh) {
      await global.kuzzle.internalIndex.refreshCollection(this.collection);
    }
  }
Deletes all instances matching the given query.
 - the instance delete method will be called on each occurence

@param {Object} query - Search query (e.g. { match_all: {} })
@param {Object} options - refresh (undefined)

@returns {Promise}