updating elasticsearch discovery to use stage