【问题标题】:Nested Query giving 5000 error code in Couchbase嵌套查询在 Couchbase 中给出 5000 错误代码
【发布时间】:2019-12-07 11:53:30
【问题描述】:

查询抛出5000错误码:

select `e`.* from e where _engViewType = 'lk' and
s.assets[0]._id= 'de1bf489-b086-48c8-bbe1-af9527f9ca12' and
s.assets[1]._id IN (select RAW e1.s.assets[0]._id from e as  e1 where 
e1._engViewType = 'LE' and e1.s.assets[1]._id = '39dac2f6-19a9-441f-b293-2e9e5cf3b6ed')

但是当我执行内部查询并将其结果用于外部查询时:

select `e`.* from e where _engViewType = 'lk' and
s.assets[0]._id= 'de1bf489-b086-48c8-bbe1-af9527f9ca12' and
s.assets[1]._id IN ['ty6-bf48-b086-48c8-bbe1-af9527f9ca12']

给出正确的输出,没有错误。

【问题讨论】:

  • 您使用的是哪个版本的 Couchbase Server?

标签: couchbase n1ql


【解决方案1】:

您的第一个查询在最新的开发版本上运行良好。您可以尝试使用最新版本的 Couchbase 吗?如果仍然无法正常工作,请与我们联系,告知您正在使用的版本以及所运行的操作系统。

【讨论】:

  • 应该可以的。还可以尝试以下 select e2.* from e AS e2 where e2._engViewType = 'lk' and e2.s.assets[0]._id= 'de1bf489-b086-48c8-bbe1-af9527f9ca12' and e2.s.assets[ 1]._id IN(从 e 中选择 RAW e1.s.assets[0]._id 作为 e1 其中 e1._engViewType = 'LE' 和 e1.s.assets[1]._id = '39dac2f6-19a9-441f-b293 -2e9e5cf3b6ed');
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多