N1QL Joins on same bucket but with different type of document

Every document in Couchbase has an external key that is used for key-value lookup. That is what I am referring to.