Yes I got myself in serious trouble once on this point! I accidentally (or without thinking) chose the other option and files I had on iCloud were deleted. When I figured out what had happened, I thought no sweat, I can get them from the iCloud.com file recovery — but it didn’t work and actually gave me an error on icloud.com.
Called Apple and eventually figured out what happened and indicated this was a known problem they were working (I assume about deleting iCloud files from 3rd party apps regarding their file recovery capability). I went on to recover from my Backup files and Apple eventually restored ‘everything’ from my deleted folder, but it reinforces #1 always have a backup, and #2 heed all the warnings the DT team makes about indexing, cloud syncing, etc. in the manual and on discourse!
I’m on here now looking to see whether I ‘should dare’ to index my Obsdian vault which is on iCloud at all. I see Korm’s method, perhaps that will work. I see others indexing their Zotero which I hadn’t thought of before, maybe I’ll try that too. Perhaps I’ll try now that I’m getting pretty good at recovering from backups and experiment before committing….