Acute functional dyspepsia, also known as heartburn, indigestion or sour stomach, was a condition of the upper esophageal tract becomes irritated and inflamed, causing considerable discomfort. Among other things, the condition could be caused by eating too many spicy or acidic foods. Symptoms included: burning sensation in the throat or chest (sometimes described as chest pain), nausea or a foul taste in the mouth, perspiration.
Captain James T. Kirk hoped that by steering the USS Enterprise towards the supposed stomach area of the cosmic cloud creature, they could "give it enough indigestion" to cause it to change its course away from the planet Mantilles. (TAS: "One of Our Planets Is Missing")
After repairing the HMS Bounty on Vulcan in 2286, Montgomery Scott mentioned in his report to Admiral Kirk that he replaced the Klingon food packs because "they was givin' me sour stomach," to which Kirk replied, "Oh, is that what it was?" (Star Trek IV: The Voyage Home)
Later that year, Garak commented that Julian Bashir risked indigestion by rushing his food, and proceeded to offer a sociological analysis of why Humans should eat this way when there was plenty of food for all. (DS9: "Improbable Cause")
In 2374, several of the crewmembers of the USS Voyager developed acute functional dyspepsia after eating Neelix's version of Rodeo Red's Red-Hot, Rootin'-Tootin' Chili in the mess hall. Lieutenant Tom Paris diagnosed it after several crewmembers complained of chest pain, and he replicated antacid to relieve their pain. (VOY: "Message in a Bottle")