The Gaia data release 2 dataset has some parallaxes listed as negative. What is the proper interpretation of this? Should they be discarded as bad data? Use their absolute value to calculate the distance? Use them as-is and treat them as negative distances along the right ascension/declination vector?
Did you read this section of the documentation? It suggests there are ways to deal with it, but I have not examined the paper it refers to.
• For closely aligned sources (separated by 0.2–0.3 arcsec), which are only occasionally resolved in the Gaia observations, confusion in the observation-to-source matching can lead to spurious parallax values which are either very large or have a negative value very far away from zero in terms of the formal parallax uncertainty quoted in the catalogue. These sources tend to be faint and located in crowded regions and are also associated with unreliable (large) proper motions (Gaia Collaboration et al. 2018b). Guidance on how to clean samples from spurious parallax values is provided in Lindegren et al. (2018).
It also says there's a small bias, but it shouldn't be universally removed.
• The systematic errors in the parallaxes are estimated to be below the 0.1 mas level (Lindegren et al. 2018) but the following systematics remain. There is an overall parallax zeropoint which, from an examination of QSO parallaxes, is estimated to be around −0.03 mas (in the sense of the Gaia DR2 parallaxes being too small). The estimated parallax zeropoint depends on the sample of sources examined (Arenou et al. 2018) and the value above should not be used to ’correct’ the catalogue parallax values....
Although should not use the negative parallaxes, you should not ignore them either. If you are looking at populations of objects, removing those with negative parallaxes will lead to significant bias in your results, as Luri et al. 2018 has shown.
Negative parallaxes can be interpreted as the observer (in this case Gaia satellite) going the "wrong way around the sun" as mentioned in this Jupyter Notebook by Anthony Brown. This notebook is meant to supplement the Luri+ 2018 paper that has been mentioned in other answers and comments here.
It depends how negative the parallax is and what your "prior" knowledge is of the distance to the star.
As another answer suggests, there are some spurious large negative (and positive) parallaxes for faint, crowded sources. If possible, these should be removed.
If this is not the case, and the parallax is negative, but close to zero within its uncertainty, then it is telling you that you have a lower limit to the distance of the object (i.e. measurement uncertainties have led to a small negative parallax). Crudely speaking, you could add a couple of error bars to the parallax and treat that as a 95% upper limit (remember the 0.1 mas possible systematic error too [in Gaia DR2]).
Under no circumstances should you "use them as is", since there is no physical basis for a negative parallax or negative distance. The correct approach (a Monte-Carlo Bayesian inference, with some assumption of the prior probability distribution of distance) is described by Luri et al. (2018).
In the FWIW department, I did a check of all the Gaia release 3 stars within 28' of the center of Omega Cen with proper motion parallax angles between 89 and 200 degrees (North is 0). When only positive parallaxes (in miliarc seconds) are considered, we get:
41230: px: min: 6e-05, max:25.6742, mean:0.597625, stdDev: 0.730838. 5457.66 light years.
Meaning that there were 41,230 stars with positive parallax, and using the mean value, a distance of 5457.66 light years.
When all parallaxes were considered, there were 57,090 parallaxes found and the mean value gave a distance of 12,409 light years.
57090: px: min: -13.9651, max:25.6742, mean:0.262844, stdDev: 0.933312. 12409 ly.
Wikipedia lists the distance of Omega Cen as 15,790 light years. Impossible as they seem, based on a reference grid of quasars, the negative parallaxes improve the result, although it's still quite a way off. Note also that the error bars on a parallax of 0.262844 miliarc seconds are huge, compared to the value of the parallax.
(If you prefer parsecs, divide by 3.26.)
Other data from the study:
57090: pmA: min: 89.467, max: 199.995, mean:144.201, stdDev: 25.7073.
57090: mg: min: 21.15, max:8.74, mean:18.8352, stdDev: 1.46662.
57090: pm: min: 0.0329112, max:324.281, mean:8.05287, stdDev: 4.21591.
854: rv: min: -126.413, max:440.969, mean:89.9555, stdDev: 122.159.
pmA is the proper motion angle (between 89 - 200 degrees).
mg is the Gaia G band magnitude.
pm is the amount of proper motion, in miliarc seconds.
rv is radial velocity in km/sec.