Fixed Index.retrieve so that it works with ES 1.0.0 and previous versions

The latest version of ES breaks the Index#retrieve function, and it no longer returns nil as it should. This fixes it.