将字段添加到solr模式中导致“无流".错误 [英] Adding field to solr schema causing "no stream" error

查看:31
本文介绍了将字段添加到solr模式中导致“无流".错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在接管一个项目,在将字段添加到solr模式时遇到了问题.根据solr模式api,我应该能够发送curl,但是我一直在找回此响应:

I'm taking over a project and am having issues adding a field to a solr schema. According to the solr schema api I should be able to send a curl but I keep getting back this response:

{
  "responseHeader":{
  "status":0,
  "QTime":0},
  "errors":"no stream"
}

这是我发送的请求:

curl -X POST -H 'Content-type:application/json' --data-binary '{"add-field":{"name":"information-description","type":"string","stored":true}}' http://dev-mywebsite.com:8983/solr/bdtest/schema  

我做了一些研究,看到一些帖子建议将?commit = true 添加到我的网址中;但是,这会产生相同的结果.

I did a bit of research and saw some posts advising to add ?commit=true to my url; however, that is yielding the same result..

我还搜索了错误消息,甚至搜索了solr schema api文档,但它们似乎没有在任何地方列出响应错误消息.

I also googled the error message and even searched the solr schema api docs but they don't seem to have response error messages listed anywhere.

我发送给solr的curl有什么问题?

推荐答案

您正在使用哪个版本的Solr?您正在使用ClassicSchemaFactory还是ManagedIndexSchemaFactory?

What version of Solr you are using? Are you using the ClassicSchemaFactory or the ManagedIndexSchemaFactory?

如果配置中有一个名为schema.xml的文件,则说明您使用的是经典schema.工厂.但是,Schema API只能与ManagedIndexSchemaFactory一起使用.

If your config has a file named schema.xml then you are using the classic schema . factory. But Schema API can be used only with the ManagedIndexSchemaFactory.

如果您有一个使用ClassicIndexSchemaFactory的现有Solr集合,并且希望转换为使用托管模式,则只需修改solrconfig.xml以指定ManagedIndexSchemaFactory的使用即可.

If you have an existing Solr collection that uses ClassicIndexSchemaFactory, and you wish to convert to use a managed schema, you can simply modify the solrconfig.xml to specify the use of the ManagedIndexSchemaFactory.

您可以阅读有关 查看全文

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