Solr删除因某些原因无法正常工作 [英] Solr delete not working for some reason

查看:82
本文介绍了Solr删除因某些原因无法正常工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

只是尝试删除所有文档,并执行此操作:

Just trying to delete all the documents, and did this:

http://localhost:8983/solr/update?stream.body=%3Cdelete%3E%3Cquery%3E*:*%3C/query%3E%3C/delete%3E

然后提交:

http://localhost:8983/solr/update?stream.body=%3Ccommit/%3E

我收到回复:

<lst name="responseHeader">
<int name="status">0</int>
<int name="QTime">17</int>
</lst>
</response>

但是当我搜索时,我仍然会得到结果。

But when I search I still get results back.

我做错了什么?

推荐答案

不确定是否重要但你可能编码:too

Not sure if it matters but you might encode the : too

http://localhost:8983/solr/update?stream.body=%3Cdelete%3E%3Cquery%3E*%3A*%3C%2Fquery%3E%3C%2Fdelete%3E

要尝试的另一件事是使用POST方法(调用更新的首选方式):

Another thing to try is to use the POST method (the preferred way to call update):

curl http://localhost:8983/solr/update?commit=true -H "Content-Type: text/xml" --data-binary '<delete><query>*:*</query></delete>'

这篇关于Solr删除因某些原因无法正常工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆