【问题标题】:SOLR CSV processing error - missing required fieldSOLR CSV 处理错误 - 缺少必填字段
【发布时间】:2013-08-14 13:51:15
【问题描述】:

当我尝试使用此命令索引我的 CSV 时:

curl http://:8983/solr/update/csv --data-binary @3QA_GetProductData.csv -H 'Content-type:text/plain;字符集=utf-8'

我得到这个错误:

<lst name="responseHeader">
    <int name="status">400</int>
    <int name="QTime">47</int>
</lst>
<lst name="error">
    <str name="msg">[doc=100054-2-FLORALPRINT-1X] missing required field: ProdId</str>
    <int name="code">400</int>
</lst>

我的两行 CSV 是 here

和架构here (抱歉这里放不进去,行太长了)

你能看到什么吗?

非常感谢您的任何想法!

里尔

【问题讨论】:

  • 只粘贴代码的重要行。另外,您是否有机会在其他地方使用ProdId?看看你如何在schema.xml 中定义你的 prodid 会很有帮助

标签: solr


【解决方案1】:

好的,你对ProdId 的定义是这样的:

<field name="ProdId"  type="string" indexed="false" stored="false" required="true" multiValued="false" /> 

据我所知,Solr 不喜欢既不是stored 也不是indexed 的必填字段。

另外,我记得在使用 id 作为字段名称后缀时遇到了奇怪的问题。

【讨论】:

    猜你喜欢
    • 2013-05-30
    • 1970-01-01
    • 2012-04-02
    • 2018-05-22
    • 1970-01-01
    • 2014-08-02
    • 1970-01-01
    • 1970-01-01
    • 2014-01-19
    相关资源
    最近更新 更多