ENG-4536 Fix elastic scanner and create unit test.