gpt4 book ai didi

solr - org.apache.solr.common.SolrException 流主体被禁用

转载 作者:行者123 更新时间:2023-12-01 07:09:21 30 4
gpt4 key购买 nike

我已经设置了 apache solr 7.1 并使用 postman 工具来查询它。但是当我尝试使用 postman 删除索引数据时,出现以下错误。

要求:

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

body :
{
"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 文档,但我无法弄清楚。

最佳答案

您不需要启用流正文。只需使用 curl POST 请求将数据类型指定为 text/xml
curl http://localhost:8983/solr/solr-sample3/update?commit=true -H "Content-Type: text/xml" --data-binary '<delete><query>*:*</query></delete>'
或者,如果您正在使用 solr 中包含的后期工具:

bin/post -c core_name -type text/xml -out yes -d $'<delete><query>*:*</query></delete>'

关于solr - org.apache.solr.common.SolrException 流主体被禁用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47405333/

30 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com