Before searching you the police officer must tell you:
If you are stopped in a public place you only have to take off your coat or jacket and your gloves. If you are asked to take off any more clothes or anything of religious meaning then they must take you somewhere private or to a police station.
Remember that it still doesn't mean that you are being arrested. Also the police officer who searches you must be the same sex as you.