A search by Cherry Hill police that found two ounces of cocaine violated a suspect's rights, an appellate court has ruled.