【发布时间】:2013-02-13 13:47:39
【问题描述】:
Solr 的架构验证有问题,显示 500 错误。
SimplePostTool: version 1.4
SimplePostTool: POSTing files to http://localhost:8081/solr-project/update..
SimplePostTool: POSTing file sample-solr.xml
SimplePostTool: FATAL: Solr returned an error #500 Error Interno del Servidor
Solr的schema.xml的字段是这样的:
<field>
<field name="id" type="string" indexed="true" stored="true" required="true" />
<field name="url" type="string" stored="true"/>
<field name="content" type="text_es" indexed="true" stored="true" />
</field>
<uniqueKey>id</uniqueKey>
无需遵循等于schema.xml的顺序,id是必填字段。
sample-solr.xml
<?xml version="1.0"?>
<add>
<doc>
<field name="id">id product</field>
<field name="url">http://www.web.com/content/direct/index.html</field>
<field name="content">field content text</field>
</doc>
</add>
编译项目并测试执行:
~/opt/solr/solr/example/exampledocs$ java -jar -Durl=http://localhost:8081/solr-project/update post.jar sample-solr.xml
可以是什么?谢谢!。
【问题讨论】: