Practically speaking, make sure your lawyer is good if you can, and roll with it, do what he says and try to minimize the damage to your life.

You can sue the cops, but it'll be expensive and probably not worth it even if you could win.