Description
The following scenario should push down the ORDER BY to the index.
CREATE INDEX idx_age ON default(age, DISTINCT ARRAY name FOR name IN names END, names );
EXPLAIN SELECT META().id
FROM default
WHERE age IS NOT NULL AND ANY name IN names SATISFIES name LIKE 'test%' END
ORDER BY age
LIMIT 30 OFFSET 0;
This was raised by a user as a high priority:
https://forums.couchbase.com/t/couchbase-4-5-indexscancounter-missing-for-array-indexing/8139/5