Do I have to consent to a police search?

No you do not have to consent to a police search. And more importantly your refusal to consent to a search cannot be the sole basis for an arrest. Nothing good comes from consenting to a search. Don’t do it.