Unnest query Optimization

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

At present Array Indexing key can only index one element only.
If you need more than one those must be done post indexScan.

Also checkout Composite index from an array of objects