implement clear phase for real ES plugin

TODO: add source_ids check after they got added to the payload data