Creating covering array index requires the whole-array field itself as one of the index-keys to the CREATE INDEX. This restriction has following issues:
1) index keys are limited to 4K in size. So, covering array indexes can't be created with larger arrays. This limits the size of the array or size of array elements.
2) CREATE INDEX hits following error because of exceeding default max_array_seckey_size value. With large arrays (see user example below), this value reaches big numbers which may lead to unexplored territories (with no clear guidelines etc).
— Encoded array key too long. Length of key = 33240, Limit = 30978
Following lists few use cases hurt by the current limitation:
Largest array is going to be 2000 entries max. I've done some work to shorten
the length of array entries, so rather than:
2) Internal UNNEST testcase hits hard limit to test with larger arrays (with 1000 elements): https://issues.couchbase.com/browse/MB-21619