“The things that drive the vote in November are not the same things that drive the vote in the summer, or whenever the primary is being held,” said Charles Franklin, director of the Marquette Law School Poll. “You don’t have the strong structuring of partisanship within a primary that you do in a November election.”

Without the constraints of partisanship, voters’ allegiance is more fluid. They may start out supporting the incumbent but be persuaded to change their minds when they learn more about a challenger. This means that huge shifts in opinion can happen very quickly, in a way you are very unlikely to see in general elections.

Take the poll that showed Ms. Pressley’s opponent, Representative Michael Capuano, leading by 13 points. It was conducted more than a month before the election, and “at the time, that was probably an accurate depiction,” said Patrick Ruffini, a Republican pollster and co-founder of Echelon Insights. “But things change very quickly in primary electorates, where voters are unmoored from party preferences. I’ve seen numbers move 20 points or more in a week.”

[Read more about how The Times is polling the midterms]

The polls were too early

Unlike in presidential races, voters tend not to pay much attention to congressional primaries until the last weeks or even days before they vote, so early polling may be way off base. And if one of the candidates is running a grass-roots campaign, in which personal engagement is decisive, accurate early polling becomes even harder.

“The engagement comes late, the paid communication comes late, so what happens in the last two or three weeks matters a lot,” said Anna Greenberg, a Democratic pollster at Greenberg Quinlan Rosner. “If there’s a heavily grass-roots campaign, the impact of that is going to be felt really close to Election Day and on Election Day.”