This is a shared project for all the applications that want to read and write into the ElasticSearch.
You can run elasticsearch locally.
-
Install elasticsearch
-
Install icu tokenizer plugin
${ELASTIC_HOME}/bin/elasticsearch-plugin install analysis-icu
We recommend ElasticSearch Head chrome plugin to connect to ES
Generate local ES indexes for our resources:
(cd push-es-mappings/ ; mvn -Dhost=localhost:9200)If the indices did not yet exist, it as assumed that you want to run a reindex operation, and the refresh rates are set accordingly.
Run the command again to make it ready for actual reading.
Via the same way mappings can be updated. After changing the mappings under:
./*-es-mapping/src/main/resources/es*/mapping/*.jsonyou can test your changes by executing the UnitTest in ESMediaRepositoryPart1ContainerTest
To be able to change the dev/test or even prod environment you need to have a tunneling from your machine.
The script can also be run against the elasticsearch implementation at amazon. This installation required username/password, and port-forwarding.
It is summarized in a makefile. I depends on openshift-cli, and that you’re currently logged in.
(cd push-es-mappings/ ; make push-prod)It can also be done via a pipeline in gitlab ci.