In my world, people are able to use magic to produce piezoelectric materials of a high strength, making it a viable material for use in weapons and armour. For the purpose of this question you can assume the material to be equal to steel in all other regards, unless a different set of properties is required to answer the question.
As I understand it, piezoelectricity is a phenomenon in which a material produces a charge when undergoing elastic deformation. This leads me to believe blunt weapons such as hammers would produce the greatest amount of electricity as they would smash into an opponent, as opposed to sharp weapons which should cleave through an opponent.
I also imagine that even if a notable charge could be produced, leather or thick cloth armors would block it from shocking the opponent, meaning they would need to be unarmoured or wearing metal armour. You can assume them to be naked when answering.
Assume a medieval level of technology. For the purposes of this question, my magic system has no relevance beyond its ability to produce strong piezoelectric materials.
I was unable to confidently find the efficiency of piezoelectric materials and generators, with figures online ranging from 7% to 90%. If you have knowledge of the subject, use your best judgement. If not, let's go with an efficiency of 30% (I assume that's 30% of energy that goes into causing elastic deformation in the weapon?).
Assume a 'notable shock' to mean a shock that causes significant pain/surprise, or which can cause the body (or a body part) to jolt.