4

I have previously install elasticsearch 5.3.1 on my Mac using homebrew. The latest elasticsearch on homebrew is now 5.5.0, so any new team members running the brew install would pick up that version.

I noticed I have some index migration issue from elasticsearch 5.3.1 to 5.5.0, see Delete all elasticsearch indices directly without curl

Since we will be using Amazon elasticsearch service with is on 5.3, can we lock onto a specific version of elasticsearch (say 5.3.1) when we homebrew install?

I don't see the older version (except for 2.4) when I do a brew search

$ brew search elasticsearch
elasticsearch ✔                                      elasticsearch@2.4
frank
  • 1,178
  • 1
  • 14
  • 34
  • Possible duplicate of [Homebrew install specific version of formula?](https://stackoverflow.com/questions/3987683/homebrew-install-specific-version-of-formula) – Ortomala Lokni Jul 20 '17 at 21:52
  • @OrtomalaLokni Thanks, I did check this post earlier before I wrote my post. But the brew search doesn't seem to list even the previous elasticsearch version I installed (ie. 5.3.1) a little over a month ago. – frank Jul 21 '17 at 18:14

1 Answers1

3

List your previous installed version of elasticsearch with:

ls /usr/local/Cellar/elasticsearch/

Then switch to the desired version:

brew switch elasticsearch 5.3.1
Ortomala Lokni
  • 41,102
  • 15
  • 134
  • 190
  • 1
    Thanks that works for me who already had elasticsearch 5.3.1 installed, how about for user setting up for the first time (ie. other team members), would they be able to get elasticsearch 5.3.1 as well. – frank Aug 17 '17 at 17:04
  • You can simply copy them the content of `/usr/local/Cellar/elasticsearch/5.3.1` – Ortomala Lokni Aug 17 '17 at 18:51