The mddiagnose tool gathers system and Spotlight information in order to assist Apple when investigating issues related to Spotlight.