zoukankan      html  css  js  c++  java
  • [solr]

    删除solr索引数据,使用XML有两种写法:

    1)

    <delete><id>1</id></delete>
    <commit/>

    2)

    <delete><query>id:1</query></delete>
    <commit/>

    删除所有索引,这样写就可以了:

    <delete><query>*:*</query></delete>
    <commit/>

    注意:这个<commit/>节点不能少,否则删除动作的事务不会提交。

    删除索引管理界面运行:

    也可以使用POST数据到这个URL方式运行:

    http://localhost:8899/solr/mycore/update?wt=json

    POST数据为:

    复制代码
    <add commitWithin="1000" overwrite="true">
        <delete>
            <query>id:1</query>
        </delete>
        <commit></commit>
    </add>
    唯有热爱方能抵御岁月漫长。
  • 相关阅读:
    sed 使用总结
    rgmanager 介绍
    linux nbd & qemu-nbd
    corosync基本使用
    svn 基本使用
    tornado 实践
    mysql mac启动
    postgresql
    django
    django
  • 原文地址:https://www.cnblogs.com/syq816/p/9052591.html
Copyright © 2011-2022 走看看