Is the below covering index for above query ok:
create index idx1 on bucket1(*) where key1=‘xy’;
Is this normal, I am specifically referring to the asterisk which denotes “all keys”. I dont think it is right. When I EXPLAIN, it does not use this index.
If really need whole document there is no way avoid fetch.
select RAW META().id from bucket1 where key1=‘xy’;
create index idx1 on bucket1( key1) where key1=‘xy’;
Then use SDKs fetch the document in parallel asynchronously.