A man strangled a police officer and then slapped another when he refused to undertake a drug search.