【问题标题】:Delete documents in all collections using indexeradmin rdocs使用 indexeradmin rdocs 删除所有集合中的文档
【发布时间】:2015-01-25 15:38:19
【问题描述】:

可以用吗?

indexeradmin rdocs list-of-ids.txt

删除所有集合中的所有文档。

我运行了命令,但发现它没有删除文档,从它说要指定集合名称的文档中,我可以删除每个集合的文档,但只是想知道是否可以从不同的集合并让 indexeradmin 将它们全部删除。例如一个文件包含:

  • 0034953453453453_collection1
  • 4345345345345334_collection2

将删除 collection1 和 2 中的文档。

【问题讨论】:

  • 如果您在多个节点上运行 FastESP,您需要指定集合,并且需要确保为所有节点执行此操作。我们通常对集群的每一列/行使用“indexeradmin --column=1 --row=1 rdocs list-of-ids.txt collection-name unique-identifier”。
  • 您可以像这样轻松获取集合中所有文档的列表:“indexerinfo -a reportcontents collection-name”

标签: fast-esp


【解决方案1】:

对每个集合执行以下操作:

indexerinfo -a reportcontents collection-name > /tmp/list-of-ids.txt
indexeradmin --column=1 --row=1 rdocs /tmp/list-of-ids.txt collection-name session-id

对集群的所有列/行执行第二行。您可以为 session-id 选择任何随机整数。

【讨论】:

    猜你喜欢
    • 2020-09-08
    • 2014-05-20
    • 2018-08-08
    • 2018-11-01
    • 1970-01-01
    • 2015-03-24
    • 2023-03-24
    相关资源
    最近更新 更多