Created
October 18, 2022 01:16
-
-
Save kveber/55f1528bdcceecea7b278c1e26408f60 to your computer and use it in GitHub Desktop.
Rebuild All Couchbase N1QL Indexes After Restore
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Note: Extra () around subquery is needed make it expression. i.e one () for BUILD index syntax and other() for subquery. | |
BUILD INDEX ON default((SELECT RAW name FROM system:indexes WHERE keyspace_id = 'default' AND state = 'deferred')); | |
-- Wait few secs finish build index and see if build is complete. | |
SELECT RAW name FROM system:indexes WHERE keyspace_id = 'default' AND state = 'deferred' ; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment