Melt the butter in a large saucepan over medium heat. Add the ginger and shallots and cook until the shallots are softened, 2 minutes, and then pour in the sherry and vinegar and simmer until the liquid is almost completely absorbed, 3 minutes. Stir in the sugar, lemon zest, whole cranberries and 1/2 cup water. Bring to a simmer and cook until the cranberries begin to burst and the mixture is thick and syrupy, 20 minutes. Pour into a medium bowl and let cool slightly.
Fold in the chopped cranberries, walnuts, scallions and pears and season with the salt and pepper. Chill until ready to serve.