我定义了一个像
{
'info' : {
'type' : 'dict',
'unique' : True,
'schema' : {
'propertyA' : {'type':'string'},
'propertyB' : {'type':'string'},
'propertyC' : {'type':'string'}
}
},
'others' : {'type':'string'}
}
然后,我将以下文档发布了两次,第一次返回 OK,第二次返回“非唯一错误”。
[
{
"info" : {
"propertyA" : "a",
"propertyB" : "b",
"propertyC" : "c"
},
"others" : "other things"
}
]
但是当我按如下方式发布文档列表时:
[
{
"info" : {
"propertyA" : "a",
"propertyB" : "b",
"propertyC" : "c"
},
"others" : "other things"
},
{
"info" : {
"propertyA" : "a",
"propertyB" : "b",
"propertyC" : "c"
},
"others" : "other things"
}
]
两个文档都插入到数据库中。
为什么他们有不同的结果?