Hi,
I’m trying to join a tree like structure.
I have designed my documents as below.
productType1
"attributes": [
"attribute1",
"attribute2"
]
attribute1
"values": [
"value1",
"value2"
]
I want to query productTypes then include attributes in productTypes then include values in attributes. All of the documents are in the same bucket.
I’ve tried this query:
select * from mybucket productType use keys[‘productType1’]
join mybucket attributes
on keys productType.attributes
join mybucket values
on keys attributes.values;
The query gives somewhat OKAY response, but with many duplicates and incorrect format.
Is there a way to get the response I want? if not, is there a way to simply query all of the productTypes, attributes, and values so that I can sort them in code?