Very discomforting. Anyhow, whatever the reason and no matter where it happens, I wouldn't advice to slap a police officer across the face, they'll consider this a physical attack on an officer in duty which means serious trouble.

A judge must give police permission to hold someone for up to 10 days, this period can be extended another 10 days and on exceptional cases a further five until a charge is brought.
I don't know enough about the Japanese Code of Criminal Procedure (yet), but I am wondering about the duration of detention in case of petty crimes. Solitary confinement for selling tickets??