N1QL query - Difference b/w USE KEYS and META().id

Hi Team,
I am trying below query in workbench.

SELECT meta().xattrs._sync.rev from poc USE KEYS ‘XXXX::YYYYY’ - returns data - when i inspect it is returning from history ( meaning record has been deleted and tombstone)
“rev”: “4-7f33315e056c7b7cf05a40f9c46e6c21”,
“sequence”: 6391864,
“time_saved”: “2020-08-03T11:45:09.038549053-05:00”,
“tombstoned_at”: 1596473109,
“value_crc32c”: “0x00000000”

SELECT meta().xattrs._sync.rev from poc where meta().id= ‘XXXX::YYYYY’ - no response.

How to make USE KEYS - not to take tombstoned data?

Thanks.

When xatts referenced in query it will fetch the documents even it deleted. Query needs only non-deleted documents use WHERE clause with IS NOT NULL like below

SELECT META(p).xattrs._sync.rev 
FROM  `poc`   AS p USE KEYS "XXXX::YYYYY"
WHERE p IS NOT NULL;

Thank you, working as expected.