I have two buckets name like temp and temp1 respectively, and this document structure as below
For temp data
{
“_id”: “123”,
"data: [“TEST:123”, “TEST:345”]
}
For temp1 data
{
“data”:[“TEST:123”, “TEST:678”]
}
both buckets having this type of data and I want join this two buckets based on data array from temp1 any value presents in temp then return temp1 _id how I should write join on this two buckets, is necessary to create index on this both buckets array data fields ? I need query like this select ARRAY_INTERSECT[t.data, t1.data] from temp t temp1 t1 but it not work
I have another one doubts how I will get _id from temp buckets if Array_intersect match in result I want some thing like this
[
{"_id":“123”},
{"_id":“345”},
etc.
]
Thanks for your reply, I resolved that issues with other query but I have problem is in both temp and temp1 buckets data array having 10000 values and documents almost more than 10000 and that array intersect takes time out issues