Can I complain againsts police if they beat me without any valid reason?

Me with my friend (both aged - 20years) decided to sit and chill in a playground like place near our home..it was around 7:30pm, we were eating snacks and discussing about stuff sitting on our bike, the playground was not very lit so it was dark around..there were few people around with cars and stuff..i am not sure what they were doing but we were minding our buisness..they a police patrol vehicle arrived at us and started questioning us like why we are here this late..this is not a place to roam around and stuff..we understand them so we were okay with it so we answered to them that we are not doing anything wrong we are just here relax then they started searching our body and our things in out pockets..then they wrote our names, address, phone no., vehicle no. etc warning us to not do this again(also they were talking very rudely)...after all that one of the police man asked the other one to take out the sticks and beat us and a third one appear in front of us and started slapping my friend and holding his neck (multiple times) just cause my friend was calling the police officer 'uncle' and they took out a long stick and they hit us once with it on our back and asked us to leave now warning us to not come here again...they we just left without saying anything..after coming home am writing this i just want to know if we did anything wrong..and if not what actions can we take against it..i don't know any names of any officer present there at that time.