I've never had any trouble, but I'd hate for my first confrontation (not that I'm planning one) to be an escalation of egos to the point where I find myself with a record!
But if you have done nothing you can not be charged with anything. Remember the police only report crime for prosecution. They do not want to look silly in the eyes of the Crown Prosecution Service (all those 'kin clever dicky lawyers with their law degree's) and definately not in front of Magistrates or a Judge - my wife was a Magistrate and she would rip a copper a new hole if he expected to win a case on the goodwill of the court.
Contrary to popular belief the police, CPS and judiciary do not all get together for breakfast or dinner and drinks at either end of the court day. The judiciary requires that all cases heard in their court are correctly presented - if made aware of a breach of the law by the police they will bounce them severly.
If the officer has no reason to search you then he does not need to mess you around by searching you. Sad to say thats all it is, harrassing a dodgy looking character.........hand up, I've done it and I've seen it done plenty of times. The thing is if it is at a reasonable time of the day, you are not drunk or behaving suspiciously you have nothing to worry about.
"Why do you want to search me officer"?
"Are you allowed to do that"?
"I'm not too sure you are, I am not saying I do not consent to a lawful search but I would like a supervising officer to come here and tell me it is legal and I would like you to enter this conversation in your pocket book and let me countersign it and I would also like you to give me one of your official business cards with your name and number on it".
Also get another member of the public to stand there as an independent witness to what is said.
The Law is the Law, thats why out of the 300,000 police officers reported for speeding last year only 400 were prosecuted........they know how to use the law.
Anyway that's it for my legal input, I'm here for the tree's.
edit: apparently I used a naughty word, I apologise.