【问题标题】:404 not found while indexing xml file in solr在 solr 中索引 xml 文件时找不到 404
【发布时间】:2012-07-22 08:09:29
【问题描述】:

您好,我在索引 xml 时收到 Http 错误 404 说问题访问。/solr/#/myproject/update 找不到原因

任何人都对此有任何线索。

谢谢

【问题讨论】:

  • 什么是 ./solr/#/myproject/update ???????? http网址???这里面是什么 ??你怎么上传???

标签: xml solr indexing


【解决方案1】:

如果要在 Solr 中插入数据,则需要执行 curl 命令。

  1. 你需要在你的电脑/服务器上安装php5-curl模块
  2. Solr 必须正在运行
  3. 您需要一个 xml 文件,其中包含与 schema.xml 具有相同字段名的数据

打开终端并执行:

curl yoursolrURL/update -H "Content-type:text/xml" --data-binary @yourfilewithdata.xml
curl yoursolrURL/update -H "Content-type:text/xml" --data-binary "<commit/>"
curl yoursolrURL/update -H "Content-type:text/xml" --data-binary "<optimize/>"

我就是这样做的。告诉我这是否对您有帮助。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-06-18
    • 1970-01-01
    • 2011-08-12
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多