You really believe that it is common practice for a search warrant to be issued after a formal court hearing?
All it takes, and has ever taken, is for a peace officer to go to a judge and make an affidavit that he has reasonable grounds for a search.
I repeat, there is no provision for secrecy.