It's always advisable to use some sort of shock troops (even small unit, no matter) with spearmen, like you said, so that they go through the spearmen ranks. The spearmen hold enemy at bay, and the shocktroops (swords or something nice) waste the enemy spears and other.
Very nice.-