结合solr 10无模式模式和_childDocuments_

时间:2015-01-28 14:02:22

标签: solr solrj solr4

尝试在无模式集合中添加这样的json时。

{
    "add": [
        {
            "id": "1",
            "title": "Solr adds block join support",
            "content_type": "parentDocument",
            "_childDocuments_": [
                {
                    "id": "2",
                    "comments": "SolrCloud supports it too!"
                }
            ]
        },
        {
            "id": "3",
            "title": "Lucene and Solr 4.5 is out",
            "content_type": "parentDocument",
            "_childDocuments_": [
                {
                    "id": "4",
                    "comments": "Lots of new features"
                }
            ]
        }
    ]
}
索尔抱怨道:

{
  "responseHeader": {
    "status": 400,
    "QTime": 1
  },
  "error": {
    "msg": "ERROR: [doc=2] unknown field 'comments'",
    "code": 400
  }
}

感谢。

0 个答案:

没有答案