我在端口8983上安装了solr并创建了一个核心 mycore ,然后在端口8984和7574上安装了2个节点的solrcloud。
当我使用以下命令从 mycore 端口8983上的exampledocs索引样本xml时
java -Dc=mycore -jar post.jar C:\solr-6.4.0\example\exampledocs\solr.xml
我收到错误:
SimplePostTool: WARNING: Solr returned an error #400 (Bad Request) for url: http://localhost:8983/solr/mycore/update
SimplePostTool: WARNING: Response: <?xml version="1.0" encoding="UTF-8"?>
<response>
<lst name="responseHeader"><int name="status">400</int><int name="QTime">130</int></lst><lst name="error"><lst name="metadata"><str name="error-class">org.apache.solr.common.SolrException</str><str name="root-error-class">java.lang.IllegalArgumentException</str></lst><str name="msg">Exception writing document id 7be3295f-4f17-4e71-8c62-b1ca1331d524 to the index; possible analysis error: cannot change DocValues type from SORTED to SORTED_SET for field "id"</str><int name="code">400</int></lst>
</response>
SimplePostTool: WARNING: IOException while reading response: java.io.IOException: Server returned HTTP response code: 400 for URL: http://localhost:8983/solr/mycore/update
答案 0 :(得分:0)
抛出异常编写文档id字段。
cannot change DocValues type from SORTED to SORTED_SET for field "id"
检查id
字段及其定义的模式文件,确保其类型为solr.StrField
<field name="id" type="string" indexed="true" stored="true" required="true"/>