首页 > 解决方案 > 如何查找 Solr 集合更新状态

问题描述

我如何知道 Solr Collection 更新命令是否真的有效?我只做了一些小的改动(为几个字段设置了 omitTermFreqAndPositions)。我执行的命令是

curl "http://localhost:8985/solr/admin/collections?action=RELOAD&name=collection1"

我得到了回应

{
  "responseHeader":{
    "status":0,
    "QTime":1669},
  "success":{
    "***:*_solr":{
      "responseHeader":{
        "status":0,
        "QTime":1597}}}}

Solr 日志文件有这样的行

Invoked Collection Action :reload with params name=collection1&action=RELOAD&wt=json&_=1553785328234 and sendToOCPQueue=true  

其次是像这样的条目

o.a.s.c.OverseerTaskQueue Response ZK path: /overseer/collection-queue-work/qnr-0000000018 doesn't exist.  Requestor may have disconnected from ZooKeeper

我有一种感觉,这项工作没有成功完成。

标签: solrapache-zookeeper

解决方案


选择带有 id 的异步请求,然后查询状态有效。如果 123456 是您要分配的 id,请添加

&async=123456    

作为附加查询参数。提交命令后,像这样查询

collections?action=REQUESTSTATUS&requestid=123456   

仅给出查询参数。带有适当路径的前缀。


推荐阅读