  Passing stars may play an important role in the evolution of our solar
system. We search for close stellar encounters to the Sun among all 7.2 million
stars in Gaia-DR2 that have six-dimensional phase space data. We characterize
encounters by integrating their orbits through a Galactic potential and
propagating the correlated uncertainties via a Monte Carlo resampling. After
filtering to remove spurious data, we find 694 stars that have median (over
uncertainties) closest encounter distances within 5 pc, all occurring within 15
Myr from now. 26 of these have at least a 50% chance of coming closer than 1 pc
(and 7 within 0.5 pc), all but one of which are newly discovered here. We
further confirm some and refute several other previously-identified encounters,
confirming suspicions about their data. The closest encounter in the sample is
Gl 710, which has a 95% probability of coming closer than 0.08 pc (17 000 AU).
Taking mass estimates from Gaia astrometry and multiband photometry for
essentially all encounters, we find that Gl 710 also has the largest impulse on
the Oort cloud. Using a Galaxy model, we compute the completeness of the
Gaia-DR2 encountering sample as a function of perihelion time and distance.
Only 15% of encounters within 5 pc occurring within +/- 5 Myr of now have been
identified, mostly due to the lack of radial velocities for faint and/or cool
stars. Accounting for the incompleteness, we infer the present rate of
encounters within 1 pc to be 19.7 +/- 2.2 per Myr, a quantity expected to scale
quadratically with the encounter distance out to at least several pc.
Spuriously large parallaxes in our sample from imperfect filtering would tend
to inflate both the number of encounters found and this inferred rate. The
magnitude of this effect is hard to quantify.
