我有一桶50k的唱片正在制作中。我应该为所有文档添加一个新属性。为此,我通过Web控制台查询工作台执行以下查询。
select count(*) from my-bucket where orderType is missing;
--50k记录
update my-bucket set orderType = “MY_ORDER” where orderType is missing;
- 变异= 49950
问题1:Couchbase没有选择我的所有文件进行突变。
问题2:发布更新后,当我再次尝试查找缺少新属性的文档数时,计数会不断增加。
select count( * ) from my-bucket where orderType is missing;
- 100条记录
select count( * ) from my-bucket where orderType is missing;
- 200条记录
select count( * ) from my-bucket where orderType is missing;
--350条记录
有人可以解释原因以及解决这个问题的方法。我们在实时生产环境中运行这些查询。
Couchbase服务器版本:社区版5.1
尝试从my_bucket中选择count(meta()。id),其中缺少orderType。显然count(*)与couchbase中的where子句无法正常工作