繁体   English   中英

solr schema.xml验证

[英]solr schema.xml validate

我对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

可以是什么? 谢谢!。

如果是Solr 4+,请在日志屏幕下查看启动Solr的控制台或Admin Web UI。 真正的消息在服务器端,它将告诉您问题所在。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM