org.apache.solr.common.SolrException流主体已禁用 [英] org.apache.solr.common.SolrException Stream Body is disabled

查看:163
本文介绍了org.apache.solr.common.SolrException流主体已禁用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经安装了apache solr 7.1并使用邮递员工具对其进行查询.但是,当我尝试使用邮递员删除索引数据时,出现以下错误.

I have setup apache solr 7.1 and using postman tool to query it. But when I am trying to delete indexed data using postman I get following error.

请求:

GET http://localhost:8983/solr/solr-sample3/update?stream.body={
    "delete": {
        "query": "*:*"
    },
    "commit": { }
}

身体:

{
    "error": {
        "metadata": [
            "error-class",
            "org.apache.solr.common.SolrException",
            "root-error-class",
            "org.apache.solr.common.SolrException"
        ],
        "msg": "Stream Body is disabled. See http://lucene.apache.org/solr/guide/requestdispatcher-in-solrconfig.html for help",
        "code": 400
    }
}

它在以前的solr版本solr 6.6中工作.我浏览了Lucene文档,但无法弄清楚.

It was working in previous solr version solr 6.6. I went through the lucene documentation but I am not able to figure it out.

推荐答案

我仔细阅读了文档,说我需要启用流主体,因为它已在solr 7.1中禁用.

I went though the documentation, it says i need to enable stream body as it has been disabled in solr 7.1 .

启用使用:

curl http://localhost:8983/solr/solr-sample3/config -H 'Content-type:application/json' -d'{
    "set-property" : {"requestDispatcher.requestParsers.enableRemoteStreaming":true},
    "set-property" : {"requestDispatcher.requestParsers.enableStreamBody":true}
}'

这篇关于org.apache.solr.common.SolrException流主体已禁用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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