Depends where and why the search was conducted. If you're talking about getting frisked at the airport, expect to be sexually assaulted unless you want to be body scanned (have a look on YouTube if you doubt this happens). However the TSA generally uses females on female passengers. If you're
referring to a "terry stop and frisk" that frequently occurs (allegedly for officer safety) then police will frisk you as a female whether they are male, female, or otherwise. When searched fully incident to arrest, cops may attempt to retrieve a female officer to search a female suspect but this is per each departments practice and by no means universally practiced. I've had several female clients who were felt up by male cops during a search. Learn and exercise your rights, don't consent to searches, and don't talk to police. Good luck
I agree completely with Mr. Dinkar. NEVER consent to a search, but NEVER resist if they do one anyway. The police should take all reasonable steps to avoid turning the search into sexual harassment, such as having a female officer pat down or search female suspects/arrestees, but issues of necessity (e.g. no female officer available) and security (e.g. they reasonably believed you were armed) can trump polite niceties and, unfortunately, can be used as excuses by malfeasant officers to get away with sexual assault. Don't resist the cops, but tell your attorney of any irregularities about any search or "frisk" right away.
The response above is not intended as legal advice. This response does not create an attorney-client relationship. Legal questions can only be fully answered through consultation with an attorney to whom you give full and accurate details. Anything you post here is not confidential and is not protected by the attorney-client relationship. It is highly recommended that you seek advice from a criminal defense attorney licensed in your jurisdiction by setting up a confidential meeting.