If someone uses violence, with the use of weapons or not, while stealing, the punishment is higher. Under the law, this is called robbery. The punishment for robbery is(( Section 392, Indian Penal Code, 1860)) jail time of up to 10 years and a fine.
When the thief voluntarily causes/attempts to cause death to you, restrains you, hurts you, or causes you to fear any hurt, then this is a crime of robbery.
Even if the violence happens while committing the theft, in order to commit the theft, attempting to or carrying away stolen items, it is still a crime of robbery.
If you have faced a violence while theft, read here to understand the steps/options you can take to complain.