avoiding foods and situations that seem to cause it may help. because indigestion can be a sign of a more serious problem, see your health care provider if it lasts for more than two weeks or if you have severe pain or other symptoms. your health care provider may use x-rays, lab tests, and an upper endoscopy to diagnose the cause. you may need medicines to treat the symptoms.