Updates to Elasticsearch for local development

We are in the process of rolling out a new plugin to our Elasticsearch service. A full changelog for those hosting CommCare will be posted shortly.

For now there are some changes to the local development environment setup:

  • Update Elasticsearch docker containers to include a new plugin (phonetic-analysis).

Docker update steps

Before running this process you should ensure that you have updated your Git repository to pull in the most recent changes on the master branch.

  1. Update docker containers
./scripts/docker stop elasticsearch2
./scripts/docker rm elasticsearch2
./scripts/docker up -d elasticsearch2
  1. Check that the new plugin is installed
curl "localhost:9200/_cat/plugins?s=component&h=component,version"
> analysis-phonetic 2.4.6
  1. Recreate the affected index
./manage.py ptop_reindexer_v2 case-search --cleanup

Non-docker update steps

If you are running ES outside of docker you need to manually install the plugin and restart your ES service:

Elasticsearch v2

$ <es home>/bin/plugin install analysis-phonetic

Elasticsearch v5

$ <es home>/bin/elasticsearch-plugin install analysis-phonetic

Now restart your ES service.