Indonesian authorities have detained seven people after a riot caused damages to Buddhist temples in northern Sumatra Island.