当前位置:首页 > 开发 > 系统架构 > 架构 > 正文

solr删除所有索引信息

发表于: 2014-04-18   作者:alleni123   来源:转载   浏览:
摘要: http://wiki.apache.org/solr/FAQ Use the "match all docs" query in a delete by query command: <delete><query>*:*</query></delete> You must also commit after ru
http://wiki.apache.org/solr/FAQ


Use the "match all docs" query in a delete by query command: <delete><query>*:*</query></delete>

You must also commit after running the delete so, to empty the index, run the following two commands:

curl http://localhost:8983/solr/update --data '<delete><query>*:*</query></delete>' -H 'Content-type:text/xml; charset=utf-8' 
curl http://localhost:8983/solr/update --data '<commit/>' -H 'Content-type:text/xml; charset=utf-8'
Another strategy would be to add two bookmarks in your browser:

http://localhost:8080/solr/update?stream.body=<delete><query>*:*</query></delete>
http://localhost:8080/solr/update?stream.body=<commit/>
And use those as you're developing to clear out the index as necessary.

solr删除所有索引信息

  • 0

    开心

    开心

  • 0

    板砖

    板砖

  • 0

    感动

    感动

  • 0

    有用

    有用

  • 0

    疑问

    疑问

  • 0

    难过

    难过

  • 0

    无聊

    无聊

  • 0

    震惊

    震惊

版权所有 IT知识库 CopyRight © 2009-2015 IT知识库 IT610.com , All Rights Reserved. 京ICP备09083238号