Google 数据存储模拟器 - 未找到匹配的索引

Google Datastore emulator - No matching index found

我正在尝试 运行 Google Cloud 的本地数据存储模拟器。

我 运行 解决了它抱怨我没有复合索引的问题。

(StatusCode.FAILED_PRECONDITION, no matching index found. recommended index is:<br/>- kind: taskgroups<br/>  properties:<br/>  - name: state<br/>  - name: available_tasks<br/>)>

我将 ~/.config/gcloud/emulators/datastore/WEB-INF/index.yaml 中的 index.yaml 文件修改为以下内容:

 indexes:
 - kind: taskgroups
   properties:
   - name: state
     direction: asc
   - name: available_tasks
     direction: asc

但是,我在重启数据存储模拟器后仍然出现上述错误。我正在 运行 使用 --no-store-on-disk 选项。

gcloud beta emulators datastore start --no-legacy --no-store-on-disk

应该怎么做才能确保应用对

所做的更改

index.yaml 应该在应用程序文件夹中,而不是在模拟器文件夹中