zoukankan      html  css  js  c++  java
  • Solr4.6删除数据的办法

        Solr4.6的管理界面上,假设不配置数据导入的功能,将看不到清除数据的button。我表示非常遗憾,正好我们线上没有配置数据导入的功能。

        网上搜到的各种清理solr数据的HTTP请求,拿到我的solr4.6上測试,报service not found。看了这些请求都是在solr4之前的版本号上执行的。找到了个Solr4.2的Http请求,改了改參数,才干够用。

        http://solr1.chat.com/staff/update/?stream.body=<delete><query>*:*</query></delete>&stream.contentType=text/xml;charset=utf-8&commit=true

       大家改下“update”之前的内容就能够了。首先是你的solr的server的域名,然后是你的core的名字。

       上面的是清除全部数据的办法,以下的是按字段删:

        

        http://solr1.chat.360buy.com/staff/update/?stream.body=<delete><query>id:chenxiaowei3</query></delete>&stream.contentType=text/xml;charset=utf-8&commit=true


        http://solr1.chat.360buy.com/staff/update/?stream.body=<delete><id>lihongsheng3</id></delete>&stream.contentType=text/xml;charset=utf-8&commit=true

  • 相关阅读:
    go相关
    mac下使用vscode技巧
    mac下secureCRT的使用技巧
    python subprocess实时输出
    python中多级目录导入模块问题
    python的print与sys.stdout
    python中类相关笔记
    python中sys.stdout.flush()的作用
    nginx+uwsgi配置
    虚拟机的 基本配置
  • 原文地址:https://www.cnblogs.com/gcczhongduan/p/3993394.html
Copyright © 2011-2022 走看看