Fixing broken elasticsearch tests

Fix tests that broke from fixing the elasticsearch code.