I want to create a index on events which is a array of objects in document, here is my document :
{
“events”: {
“MD”: [
{
“event”: “PRESENTED”,
“createdDate”: 1560784042570
}
],
“MD”: [
{
“event”: “PRESENTED”,
“createdDate”: 1560784042570
}
]
}
}
Here is my query: select *
from detbucket det
where det.nsid = ‘event’
AND ANY events IN OBJECT_VALUES(det.events) satisfies
ANY o in events satisfies o.event = ‘PRESENTED’ end
end;