Astronomers have recently discovered a planet 15,000 light years away, making it one of the farthest known planets outside our solar system. The planet is the second to be detected using a technique called gravitational microlensing.
To discover a planet by gravitational microlensing, first a primary lensing event has to be spotted. A primary lensing event happens when a huge object, like a star, passes by a star that is located farther away relative to Earth, and only if the two line up perfectly from the vantage point of Earth. When this happens, the passing object's gravitational pull bends and focuses the light from the star lined up behind it, so that the otherwise diffused light becomes a bright point. The passing object works much like the glass lens of a refractor telescope, which also bends and focuses starlight. The result is that the star appears brighter.
As rare as a primary lensing event is, detecting a planet by gravitational microlensing also entails the viewing of a secondary lensing event. This involves even more chance and effort. Once a primary lensing event is spotted, the event must be watched very carefully for its weeks-long duration for a secondary lensing event. In order to get a secondary lensing, a third object, a planet in orbit around the lensing star, needs to line up with the two stars from the vantage point of Earth. Not only are the chances of such an exact alignment slim, but the lensing effect of the planet is weaker. Thus, the secondary change in the star's brightness takes more vigilance to spot. That's why so few planets have been discovered this way.