Agree with caregiver222.
I've had a huge number of electric shocks over the years, only one ever caused any injury (around 350-400V dc from high current source). It felt like my arm was being bitten off by some huge animal, but the actual damage was relatively small, a core of burnt flesh about 2mm wide 3-4mm deep.
I'd guess voltage supplied to a pig fence is much lower than other kinds of fence, since pigs have so much less hair to penetrate than cattle for instance.
However, I'd suggest that neighbour has fence voltage and associated electronics tested to rule out faults or incorrect wiring.
The chances are you have suffered no harm at all. Electric fences are set up so there is high voltage but insignificant amperage. It is the amperage that causes damage. Electric livestock fences have been around for a long time and the fact there is no insurance liability nor court cases should tell you something.