【问题标题】:solr schema.xml validatesolr schema.xml 验证
【发布时间】: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

可以是什么?谢谢!。

【问题讨论】:

    标签: xml solr


    【解决方案1】:

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

    【讨论】:

    • 我看不到什么版本,我收到错误400,我在端口8081上配置了tomcat,这可能是问题吗?如果我尝试在您的浏览器中查看此 URL:localhost:8081/solr-project/update,则响应为:HTTP 400 - 缺少内容流
    • 您应该知道您正在运行哪个版本的 Solr。如果您从 localhost 运行,则必须已安装它。并且您的管理 URL 应该在您的 solr.xml 文件中,尝试 ping 一下。如果你遇到了真正的问题,请尝试在发行版中运行示例并在那里开始测试。
    • 版本是3.6.2。 Estado HTTP 404 - 路径中缺少核心名称,测试 localhost:8081/solr-project/ 没问题,但问题是 localhost:8081/solr-project/admin。
    • 已经解决了。 tomcat (conf / Catalina / localhost) 不包含 solr-project.xml 文件。谢谢!。
    • Solr 版本为:Lucene 规范版本:3.6.2 错误为#500。 SimplePostTool:致命:Solr 返回错误 #500
    猜你喜欢
    • 2016-02-23
    • 2013-03-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-07-12
    • 2023-03-27
    相关资源
    最近更新 更多