作者热门文章
- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我已经设置了 apache solr 7.1 并使用 postman 工具来查询它。但是当我尝试使用 postman 删除索引数据时,出现以下错误。
要求:
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
}
}
最佳答案
您不需要启用流正文。只需使用 curl POST 请求将数据类型指定为 text/xmlcurl 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/
我是一名优秀的程序员,十分优秀!