Put the cranberries in the small bowl with enough hot tap water to cover and let them soak for 5 minutes. Drain the cranberries well and pat them dry with paper towels. The cranberry juice will stain so don’t use your best kitchen towels.
In the bowl of the stand mixer blend the flour, sugar, baking soda, baking powder, and salt until the mixture is combined well.
Add the eggs and the vanilla, beating for about 5 minutes until a dough is formed. It will come together slowly, and look crumbly for the first few minutes.
Add the cranberries and pistachios and mix on low until they are distributed throughout the dough. You might need to hand mix it if your mixer seems to be straining.
Flour your hands. Turn the dough out onto a lightly floured surface, knead it several times, and halve it. Roll each piece of dough into a log 13 inches long and 2 inches wide, place the logs at least 3 inches apart on the lined sheet pan, and brush them with the egg wash.
Bake the logs in the middle of the oven for 30 minutes and let them cool on the baking sheet on a rack for 10 minutes. On a cutting board, cut the logs crosswise on the diagonal into ¾-inch-thick slices, arrange the biscotti, cut sides down, on the baking sheet, and bake them in the 325° F. oven for 10 to 12 minutes on each side, or until they are pale golden. Transfer the biscotti to racks to cool and store them in airtight containers.