SELECT USE KEYS and getting the missing KEYS

Hello,

I have a query similar to

SELECT META().id AS key FROM BUCKET USE KEYS [“key1”,“key2”,“key3”]

the query run succesffuly even if a key is missing, which is good, but I would like somehow to also get the list of missing keys. Is is possible to also get this in the same query?

Thank you,
F

SELECT  d AS key, b AS doc
FROM ["key1", "key2", "key3"] AS d
LEFT JOIN bucket AS b ON KEYS d;

SELECT  d AS key, (b IS NOT MISSING ) AS present
FROM ["key1", "key2", "key3"] AS d
LEFT JOIN bucket AS b ON KEYS d;
1 Like