Spotlight is default search feature in Apple Mac OS X operating system. It is indexing all the content on your Mac drive, like documents, songs, pictures, apps, bookmarks, web history, web pages etc. It is also able to search in documents with specific phrases and through files metadata. However, sometimes there is a need, for example, for private reasons, to exclude some folders, or storage (external hard drives, USB Flash etc.) from Spotlight index.
Excluding specific folders from Spotlight Index
Open System Preferences and click on Spotlight icon.
Select Privacy tab → Open Finder and drag and drop folders, disks to Privacy list. You can also use Add button (icon "+").
Folders in Private list won't be indexed and information from them will be not visible in Spotlight search.
If you need to remove folders, or disks from Private list, mark them and use Remove button (icon "-"). The Spotlight will start indexing information and view them from these folders again.
If you need to hide specific folder from Spotlight index, you can use this little trick. Open Finder, click on folder and put .noindex file extension at the end of the folder's name (for example Documents to Documents.noindex). The Spotlight will stop indexing of this folder, but the old indexed information will be still visible in Spotlight search results.