重置 Solr 索引失败
目前,如果我向 Solr 发送以下按查询删除命令,索引应清除所有条目:
//<delete><query>*:*</query></delete>
http://<solr-server>:<port>/solr/update?stream.body=%3Cdelete%3E%3Cquery%3E*%3A*%3C%2Fquery%3E%3C%2Fdelete%3E
我从 solr 服务器获得的响应似乎正常:
<response>
<lst name="responseHeader">
<int name="status">0</int>
<int name="QTime">13</int>
</lst>
</response>
但是,如果我通过重新启动 Tomcat 来重新启动 Solr,然后执行选择查询,我仍然检索索引搜索结果。为什么这些结果没有被删除?
(注意:在我的笔记本电脑上我安装了一个 Solr 实例,并且在删除索引时此过程运行良好)
Currently if I send the following delete-by-query command to Solr, the index should be cleared of all entries:
//<delete><query>*:*</query></delete>
http://<solr-server>:<port>/solr/update?stream.body=%3Cdelete%3E%3Cquery%3E*%3A*%3C%2Fquery%3E%3C%2Fdelete%3E
The response I get from the solr server seems normal:
<response>
<lst name="responseHeader">
<int name="status">0</int>
<int name="QTime">13</int>
</lst>
</response>
However, if I restart Solr by restarting Tomcat, then perform a select query, I still retrieve indexed search results. Why are these results not deleted?
(Note: on my laptop I installed a Solr instance, and this process works fine when deleting the index)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
删除后,您还需要发送提交查询:
After the delete you need to send a commit query as well:
后来我发现按查询删除命令失败,因为 Linux 服务器上的文件权限阻止 Solr 执行更新。使用 chmod 命令解决了这个问题。
任何有关这方面安全的建议将不胜感激。
I found later on that the delete-by-query commands were failing because file permissions on our linux server were preventing Solr from performing the updates. Using a
chmod
command fixed this.Any suggestions for security on this would be appreciated.