Can fluentd rotate logs with elasticsearch

Can fluentd rotate logs with elasticsearch plugin? So i can use ilm or maybe opendistro to rotate logs by size or date?