Mac si MacBook they are very silent computers and in very rare cases you can hear the cooling system. When the fans start to sound, it is a sign that the processor is under stress and needs additional ventilation. When corespotlightd uses high resources CPU pe macOS, it should not be a cause for concern.
Table of Contents
corespotlightd it is not a virus or a process of an application installed on Mac.
What is a corespotlightd?
As can be deduced from the name, corespotlightd is a process that deals with the indexing of files stored on disk, email messages, notes, bookmarks from Calendar and Reminders and other information, so that they can be found by the user during searches Spotlight Search. It is a daemon (background process) native, of the operating system macOS.
Why corespotlightd uses high resources CPU?
corespotlightd uses high resources CPU when when on disk a large amount of data has been transferred. This can include pictures and videos imported into the Photos application, a large volume of email messages when you add a new account in the Mail application or other files brought to disk from external devices.
When the indexing process takes a long time, it is possible that some files to be corrupted and the process corespotlightd to enter a loop, which leads to the excessive use of CPU, even well over 100%.

Close 158% CPU usage in Activity Monitor, is a very large percentage, to which anything Mac it gets noisy.
What can you do when corespotlightd consumes a lot of resources CPU?
This problem has various solutions, depending on the cause that generates it. It can be solved with a simple restart al Mac and it is possible to format the storage unit and reinstall the operating system macOS.
1. Restart Mac
When the indexing of some data entered the loop or corespotlightd it is in a process with error, simple restart al Mac can interrupt this process. After reboot corespotlightd it is very likely that they will no longer use a large percentage of CPU.
2. Kill corespotlightd in Activity Monitor
Force Quit from Activity Monitor Process corespotlightd will reduce the consumption of resources at least for a period of time CPU.

The process will be restarted automatically, and upon restart there are good chances that it will no longer use an important percentage of resources CPU and to run in optimal parameters.
Alternatively, open the application Terminal and run the command:
killall corespotlightd
3. Removing some data from indexing
As I said at the beginning, Spotlight Search it offers results from applications, conversations, email messages, documents, and many others.
Go in System Settings → Siri & Spotlight. Here is the list of categories from which search results are provided. All you have to do is uncheck these applications.

Most of the time, problems occur when indexing email messages. Uncheck the indexing option for Mail & Messages, restartati Mac, then check in Activity Monitor process status corespotlightd.
You can also eliminate locations from disk from the search results. If you know that you have a partition or folders that contain a lot of data, and it is not necessary for them to appear in the search results, you can remove them.
In System Settings → Siri & Spotlight click on Spotlight Privacy. Click on "+" and add the location on disk which you want to be removed from indexing. (Complete tutorial)

Click "Done" and the added location will no longer be displayed in the search results on Mac.