How to join two document in same bucket

Hi,
I am using couchbase server 5.1, I am unable to join this two documents.
Doc 1:
{
“transactionID”:“txt001”,
“store_name”: “test001_003”,
“owner”: "test@t.com",
“type”: “sale”
}

Doc 1
{
“Address”:“test”,
“store_name”: “test001”,
“store_id”: “test001_003”,
“username”: "test@t.com",
“type”: “user”
}

I need like this
{
“transactionID”:“txt001”,
“owner”: "test@t.com",
“store_name”: “test001”,
“store_id”: “test001_003”,
“username”: "test@t.com"
}

Doc 1.store_name=Doc 2.store_id
Doc 1.owner=Doc 2.username
Thank you.

1 Like

In 5.1 You need to have parent child relation ship through document key to JOIN.

You can use ANSI Joins in 5.5

2 Likes