Absolutely everyone, from trainers to historians, agree that the sword was a back up weapon for when you lost your main weapon. Even the romans used the gladius only when storming already demoralized and defeated enemies.
It was more common that a soldier's main weapon would be a spear or a billhook/halberd kind of weapon because it was both more effective in field combat and cheaper to produce. Hell, the common soldiery in medieval combat wouldn't even carry swords, only knives or daggers for backup. Swords were an officer/status symbol.
Even the vikings with ulfberht swords were super rare because a sword in itself was very expensive, they used axes and weighted maces.
TL;DR Swords are fucking expensive and wouldn't be given to filthy peasants when spears were dirt cheap and quite effective in direct combat.