Fetch keys across all documents in a bucket

You can use N1QL

CREATE PRIMARY INDEX ON default;
start with key = “”
Repeat the following query until end

SELECT META().id 
FROM default 
WHERE META().id >  $key  LIMIT 1000;

key = last key

OR

 SELECT META().id 
    FROM default;
1 Like