To restore a favorite, simply type in the search and hit the star button at the top right of the project.
For example, if you want an “All Scenes” favorite, type “t:scene” in the search box, then hit the star button.
And anyone who formats their hard drive because they accidentally deleted a favorite search has seriously misunderstood some rather fundamental things.
For that matter someone who loses their game source because they formatted their HD seriously needs to take a step back from game development and learn how to perform a backup of important information. Both the simple (zip everything up and shove it onto an external data) and the advanced (use a version control system) methods.