I want search a particular text like (ftp:\) and want to replace to (http:\).
I want a bucket level query. It should search text from entire bucket documents and replace all wherever it found match.
You need to aware of the path and field name you want to replace. If you want to update the filed text and starting string is ftp://
UPDATE default AS d
SET d.text = REPLACE(d.text,"ftp://","http://")
WHERE d.text LIKE "ftp://%";
UPDATE default AS d
SET d.thumbnail = REPLACE(d.thumbnail,"ftp://","http://"),
d.pageAssets[pai] = REPLACE(pa,"ftp://","http://") FOR pai:pa IN d.pageAssets END,
ps.url = REPLACE(ps.url,"ftp://","http://") FOR ps IN d.pageBgStyle END
WHERE d._type = "BookPage"
AND (d.thumbnail LIKE "ftp://%"
OR ANY pa IN d.pageAssets SATISFIES pa LIKE "ftp://%" END
OR ANY ps IN d.pageBgStyle SATISFIES ps.url LIKE "ftp://%" END);