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....
It depends how negative the parallax is and what your "prior" knowledge is of the distance to the star is.
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).
Under no circumstances should you "use them as is", since there is no physical basis for a negative parallax or negative distance.
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.