google-cloud-platform - 删除 Google Cloud Datastore 索引
问题描述
我添加了几个月的 Google Datastore 索引很少。今天我又加了一个。几分钟后,我发现这不是我必须创建的正确索引。
我这样称呼:
$ gcloud datastore indexes list
---
ancestor: NONE
indexId: XXX1
kind: ThisIsKindName
projectId: GCP-PROJ-ID
properties:
- direction: ASCENDING
name: QueueName
- direction: ASCENDING
name: ExecutionLength
state: READY
---
ancestor: NONE
indexId: XXX2
kind: ThisIsKindName
projectId: GCP-PROJ-ID
properties:
- direction: ASCENDING
name: labels.application
- direction: DESCENDING
name: ExecutionLength
state: READY
---
...
并找到要删除的索引 (ID= XXX2
)。
我找到了清理命令描述,但我不清楚。此功能要求提供index.yaml
文件。
应该在这个文件中找到什么?
- 要保留的索引列表。该文件中不存在的所有索引都将被删除。
- 要删除的索引列表。
如果您的答案是 1(要保留的索引列表)-我如何yaml
从现有索引生成文件?它是必需的,因为我在本地没有那些索引定义。需要类似的东西:
gcloud datastore indexes list --export=yaml
解决方案
推荐阅读
- java - 如何在 ResourceChangeListener(eclipse 插件)中添加标记?
- node.js - nodejs api不转发从另一个服务收到的响应
- php - 来自 Yandex.Direct 的 GET 请求为空
- c# - 保存在数组中的位图在访问后被删除
- compiler-errors - Ocaml 错误:语法错误:')' 预期,但我找不到在哪里
- python - PYTHON Pandas - 根据其他数据帧中的值对数据帧使用 Pandas 样式
- haskell - 如何使用堆栈更改生成二进制文件的路径?
- postgresql - \COPY 不在 psql 中打印计数
- python - CSRT 算法不更新目标
- arangodb - Arangodb 磁盘空间已满