Index for N1QL Query with "order by ... DESC"


CREATE INDEX ix1 ON bucket.scope.collection (endDate DESC, name);


SELECT endDate, name 
FROM bucket.scope.collection AS c
WHERE endDate IS NOT MISSING
ORDER BY endDate DESC
 LIMIT 1
1 Like