Where does the phrase "seen the elephant" come from?

Why is it relevant to battle experience?