I had an issue in searching for content within Apple Mail. Every time I tried to search for any particular phrase the Mail application crashed and closed instantly. So I decided to Rebuild the Mailboxes. Before doing this I checked that my latest Time Machine backup had carried out successfully. (It had.)
Once confirmed I clicked Rebuild from the Mailbox drop down menu. Instantly all the mail disappeared and I was left wondering whether it was doing anything. I was patient and waited to see what would happen and sure enough after a couple of minutes all my mail re-appeared intact.
What worried me was that there was no indication that the rebuild was being done. No progress bar or spinning wheel, just an empty window. If I had been impatient I could easily have force quit the rebuild process thinking the application had crashed. That would have resulted in an Apple Mail restore to be sure.
On the Apple Website details are very basic. So, be patient, go for a walk and then come back and see if the rebuild worked.