async resetDatabase() {
    const mutex = new Mutex("resetDatabase", { timeout: 0 });

    if (!(await mutex.lock())) {
      throw kerror.get(
        "api",
        "process",
        "action_locked",
        "Kuzzle is already reseting all indexes.",
      );
    }

    try {
      const indexes = await this.ask("core:storage:public:index:list");
      await this.ask("core:storage:public:index:mDelete", indexes);

      await this.ask("core:cache:internal:del", `backend:init:import:mappings`);

      return { acknowledge: true };
    } finally {
      await mutex.unlock();
    }
  }
Reset all indexes created by users