async deleteByQuery(request) {
    let query = request.getBodyObject("query", {});
    const silent = request.getBoolean("silent");
    const refresh = request.getString("refresh", "false");
    const source = request.getBoolean("source");
    const { index, collection } = request.getIndexAndCollection();
    const lang = request.getLangParam();

    if (lang === "koncorde") {
      query = await this.translateKoncorde(query);
    }

    const result = await this.ask(
      "core:storage:public:document:deleteByQuery",
      index,
      collection,
      query,
      { refresh },
    );

    if (!silent) {
      await this.ask(
        "core:realtime:document:mNotify",
        request,
        actionEnum.DELETE,
        result.documents,
      );
    }

    if (!source) {
      result.documents.forEach((d) => (d._source = undefined));
    }
    return {
      documents: result.documents,
      ids: result.documents.map((d) => d._id),
    };
  }
Delete several documents matching a query through the persistent layer

@param {Request} request
@returns {Promise<Object>}