N1QL Query over 4 documents

Hey,

I have one “main” document that contains document uids to other document that is located in the same bucket. I want to know if there is a way to just have one query to get all the information from 3 different type of documents, like the structure below.

Main Product Document


{
“category”: “categoryUID”,
“manufacture”: “manufactureUID”,
“user”: “userUID”
}

Category document


Document name: categoryUID
{
“name”: “”
}

Manufacture document


Document name: manufactureUID
{
“name”: “”
}

User document


Document name: userUID

{
“username”: “”
}

Best Regards
Johannes

Yes, see JOIN syntax in the documentation.

1 Like