Create index on collection of objects

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;

CREATE INDEX ix1 ON  detbucket ( DISTINCT ARRAY  
                                   (DSITINCT ARRAY o.event FOR o IN  evs END ) 
                                 FOR evs IN  OBJECT_VALUES(events) END);

Example 4

https://docs.couchbase.com/server/current/n1ql/n1ql-language-reference/indexing-arrays.html