The search you describe may not be legal: the officer did not have a warrant and likely did not have sufficient cause under the circumstances for a warrantless search (the exceptions to when the police need a warrant are fairly limited). Speak with a criminal defense attorney; you may be able to get the search and its evidence thrown out, which under the circumstances, may result in the entire case being thrown out for lack of evidence.