Intersting issue count shows wrong numbers in Couchbase 4.5

#1

Select count(name) from default where name is not missing and CONTAINS(name,‘z’)

in any of document i does not have any name contains ‘z’ but when run this it shows total count of documents available in bucket

if i change query to

Select count(meta().id) from default where name is not missing and CONTAINS(name,‘z’)

it shows count zero which is correct but count is slow

#2

Filed a bug:

https://issues.couchbase.com/browse/MB-19633?filter=13615

Thanks for pointing this out.