async updateByQuery(request) {
    let query = request.getBodyObject("query");
    const changes = request.getBodyObject("changes");
    const silent = request.getBoolean("silent");
    const userId = request.getKuid();
    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:updateByQuery",
      index,
      collection,
      query,
      changes,
      { refresh, userId },
    );

    if (!silent) {
      await this.ask(
        "core:realtime:document:mNotify",
        request,
        actionEnum.UPDATE,
        result.successes.map((doc) => ({
          _id: doc._id,
          _source: doc._source,
          _updatedFields: extractFields(changes, {
            fieldsToIgnore: ["_kuzzle_info"],
          }),
        })),
      );
    }

    if (!source) {
      result.successes.forEach((d) => (d._source = undefined));
    }

    return result;
  }
Update several documents matching a query through the persistent layer

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