Couchbase N1qlQuery:删除导致查询服务出错的原因

Couchbase N1qlQuery:删除导致查询服务出错的原因,couchbase,n1ql,Couchbase,N1ql,我尝试运行此查询 delete from bucket o use keys (select raw ARRAY_CONCAT(ARRAY_CONCAT(ARRAY_CONCAT(d, t), s), u) from bucket use keys 'SS') 我得到的答复是: { "status": "Unexpected server error" } 在服务器日志中,我看到以下内容: Service 'query' exited with status 1. Re

我尝试运行此查询

 delete from bucket o
 use keys (select raw ARRAY_CONCAT(ARRAY_CONCAT(ARRAY_CONCAT(d, t), s), u)
 from bucket
 use keys 'SS')
我得到的答复是:

 {
    "status": "Unexpected server error"
 }
在服务器日志中,我看到以下内容:

 Service 'query' exited with status 1. Restarting. Messages: runtime.goexit()
/usr/local/go/src/runtime/asm_amd64.s:2232 +0x1 fp=0xc20e97cfc0 sp=0xc20e97cfb8
created by github.com/couchbase/query/parser/n1ql.NewLexerWithInit
/home/couchbase/jenkins/workspace/watson-unix/goproj/src/github.com/couchbase/query/parser/n1ql/n1ql.nn.go:30999 +0x4a6c9
[goport] 2016/11/29 08:40:11 /opt/couchbase/bin/cbq-engine terminated: signal: aborted (core dumped)
这个查询有什么问题


我使用的是couchbase 4.5版。

使用密钥需要密钥数组。ARRAY_CONCAT返回数组,子查询返回数组。它变成了数组的数组

按如下所示移除其中一个阵列

从bucket o中删除 使用键选择原始数组\u CONCATARRAY\u CONCATARRAY\u CONCATd、t、s、u 从桶里 使用键“SS”[0]


如果ARRAY_CONCAT参数丢失或为null,则可能返回4.5中相同的紧急错误。这在4.5.1中已被修复。

您也可以使用数组展平函数或第一个运算符

从bucket中删除o使用密钥 数组\u展平从桶中选择原始数组\u CONCATARRAY\u CONCATARRAY\u CONCATd,t,s,u使用键“SS”,1 返回metao.id

从bucket o中删除 在中为x使用第一个x键 选择原始数组\u CONCATARRAY\u CONCATARRAY\u CONCATd、t、s、u 从桶里 使用“SS”键 终止 返回metao.id


请注意,当子查询用作表达式(例如,用作数组展平的参数或在第一个构造中)时,子查询周围需要粗体斜体括号

您使用的Couchbase版本是什么?@geraldss Couchbase版本4.5