无法通过SOLR / CURL更新预索引数据

时间:2016-11-17 14:57:27

标签: json curl solr

我通过SOLR / CURL执行了以下索引

curl http://localhost:8983/solr/wiki/update -H 'Content-type:application/json' -d '
[
{"id" : "book1",
"title" : "American Gods",
"author" : "Neil Gaiman"
}
]'

更新数据时出现错误
curl http://localhost:8983/solr/wiki/update -H 'Content-type:application/json' -d '
[
{"id" : "book1",
"title" : "American Gods",
"author" : "Neil Gaiman"
}
]'

curl http://localhost:8983/solr/wiki/update -H 'Content-         type:application/json' -d '
[
{"id" : "book1",
"cat" : { "add" : "fantasy" },
"pubyear_i" : { "add" : 2001 },
"ISBN_s" : { "add" : "0-380-97365-0"}
}
]'

This is the error curl http://localhost:8983/solr/wiki/update -H 'Content- type:application/json' -d ' [ {"id" : "book1", "cat" : { "add" : "fantasy" }, "pubyear_i" : { "add" : 2001 }, "ISBN_s" : { "add" : "0-380-97365-0"} } ]'

当我从JSON文件“cat”中删除以下“id”时:{“add”:“fantasy”},索引将继续进行。 有什么问题?

0 个答案:

没有答案