Couchbase supports ASC, DESC in ORDER BY in all releases.
But in 5.0 on words only you can created DESC index and query will use index order if possible. Reverse Scan is not supported.
Example: CREATE INDEX ix1 ON default (a);
SELECT * FROM default a > “a” ORDER BY a DESC;
Pre 5.0 Couchbase gets all qualified items and does explicit sort to satisfies queries.
Post 5.0 If there is index CREATE INDEX ix1 ON default (a DESC );
N1QL can optimize query based on index, If query ORDER BY matches with index key order (LEFT to right) including collation order, and query semantics does’t alter avoid sort and use index order. By any reason it can’t use index order it will do explicit sort.