Is it possible to use index scan on outer keyspace in a join

#1

For example, create two indexes on both obj1 and obj2

create index a_index on bucket1(obj1,status) using gsi;
create index b_index on bucket1(obj2,status) using gsi;

when run this query, it only use index scan on “a” using a_index. Is it using key scan on “b”? Is there a way to involve b_index?

select *
from bucket1 a join bucket1 b keys a.type
where a.obj1.status=“true” and b.obj2.status=“true”

#2

Hello,

Please see http://developer.couchbase.com/documentation/server/4.5/n1ql/n1ql-language-reference/from.html#concept_rnt_zfk_np__index-join