I just copied an older release of elasticsearch into the /usr/local/Cellar/elasticsearch
directory.
$ mkdir /usr/local/Cellar/elasticsearch/5.4.3/bin
$ cp elasticsearch /usr/local/Cellar/elasticsearch/5.4.3/bin
$ brew switch elasticsearch 5.4.3
That's it.
Maybe it's useful for anyone.