Spotlight, the intelligent search function of macOS, is very fast because it creates and uses an index of all files on all connected hard disks. This option rebuilds the index. A few seconds after deleting it, the computer will automatically rerun the content indexing of the hard disks in the background. If you restart your computer during this process, the indexing is stopped and will be resumed after restarting.
If indexing is turned off, removing the index will automatically turn indexing back on. You can use the Maintenance toolbar item to rebuild the Spotlight index.