On my server I use elasticSearch which regularly goes down and the result is a 500 error for my users. I understand Systemd is now the reference for managing services.

How can I use Systemd to restart my elastic search service automatically when it goes down? I found ways to restart it, but not automatically without me checking if it's down.