Joining 3 documents

I want to join 3 documents

Doc A (main) has id of doc B but does not have id of doc C while doc C has id of doc A.

I have no problem in joining doc A and B.

I’m using couchbase server version 4.6

Document:
A { “id_B”: “B:001”… }
B // doesn’t matter i got no problem here
C { “id_A”: “A::001” }

Please let me know if this is possible in the version I currently running.

Thanks,
Emel

CREATE INDEX ix1 ON default(id_A);
SELECT  *
FROM default AS a
JOIN default AS c ON KEY  c.id_A FOR a
JOIN default AS b ON KEYS a.id_B
WHERE   .......;

4.5 https://dzone.com/articles/join-faster-with-couchbase-index-joins

5.5 https://blog.couchbase.com/ansi-join-support-n1ql/

This works!

Thanks vsr1