does a doll have to be based on a human or can it be a pig as well?
By definition, a doll is humanoid. A pig-shaped representation would be a stuffed animal, if soft, or a figurine, if made of some hard material.
The Miss Piggy doll above counts as a doll because she is treated pretty anthropomorphically – most animals don’t wear fishnets. (Insert South Dakota joke here.)
So – does a doll have to be human-shaped? Yes, because that’s what “doll” means.
The first item in a google search for “pig doll” is, er, interesting:
The “anthropomorphic” angle is probably correct, but you’ll find several retailers marketing plush pig toys which aren’t all that anthropomorphized as “pig dolls”: