Elasticsearch

Installation

sudo su -l hugh
brew tap elastic/tap
brew install elastic/tap/elasticsearch-full
brew install openjdk

At time of writing (October 2024) you get version 7.17.4 which is significantly newer than that used on legacy server(s).

Storage & Configs

Data /opt/homebrew/var/lib/elasticsearch/

Logs /opt/homebrew/var/log/elasticsearch/

Config /opt/homebrew/etc/elasticsearch/

Memory limits set in /opt/homebrew/etc/elasticsearch/jvm.options.d/memory.conf (max 4GB)

Operation

To start as a service, enabled at boot/restart, via user hugh

brew services start elasticsearch-full

Initially this didn’t work, as it couldn’t find java. Needed to create symlink as below

mkdir -p /opt/homebrew/Cellar/elasticsearch-full/7.17.4/libexec/jdk.app/Contents/Home/bin/
ln -s /usr/bin/java /opt/homebrew/Cellar/elasticsearch-full/7.17.4/libexec/jdk.app/Contents/Home/bin/java

To run as non-daemon from cli, /opt/homebrew/opt/elasticsearch-full/bin/elasticsearch

Usage

Legacy Seme4 Platform search services were built on ElasticSearch 5.something

ElasticSearch7 platform service created Oct 2024 to replicate previous functionality but running on ElasticSearch 7.17.4

There are a number of scripts in ~icm/elasticsearch-scripts to aid setup of a repository.

gotchas….

  1. if you want to index something by rdf:type you must have a qname defined for that namespace in namespaces.php

  2. when using platform services such as https://data.libmus.com/services/search/ the results are cached!