Couchbase N1QL / Couchbase SDK - Query multiple scopes

I have a usecase where a document move from one scope/collection to another. I am looking for a solution to search a those document in multiple scopes and return the document in single n1ql query. FYI, I could not find any option in the couchbase sdk.

Appreciate your response.

Thank you

In N1QL , You need to do UNION query of each scope/collections


SELECT u1.* 
FROM b1.s1.c1 AS u1
WHERE  ......

UNION ALL

SELECT u2.* 
FROM b1.s2.c1 AS u2
WHERE  ......

if you looking FTS SEARCH they have ability do this