【问题标题】:Solr delete by query: error 400, undefined field productIdSolr 按查询删除:错误 400,未定义字段 productId
【发布时间】:2016-04-08 02:48:15
【问题描述】:

当我尝试使用query 删除文档时,如下所示:

http://localhost:8090/solr/update?stream.body=%3Cdelete%3E%3Cquery%3EproductId%3A38214%3C%2Fquery%3E%3C%2Fdelete%3E

我明白了:

<response>
<lst name="responseHeader">
<int name="status">400</int>
<int name="QTime">49</int>
</lst>
<lst name="error">
<str name="msg">undefined field productId</str>
<int name="code">400</int>
</lst>
</response>

根据http://localhost:8090/solr/#/webshop/schemaproductId 存在:

<field name="productId" type="string" indexed="true" stored="true" required="true" multiValued="false" termVectors="false" />
[...]
<uniqueKey>productId</uniqueKey>

这很好用:http://localhost:8090/solr/webshop/select?q=productId%3A38214&wt=json&indent=true

我错过了什么?

【问题讨论】:

    标签: solr


    【解决方案1】:
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2015-10-16
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2023-01-04
    • 2012-09-03
    • 1970-01-01
    相关资源
    最近更新 更多