EIMU - A plugin
For Strapi CMS, this plugin enables management of Elasticsearch instances, indexes and mappings directly inside of a Strapi dashboard.
This is a powerful convenience layer that enables basic integration between the Strapi instance and Elasticsearch instances, mainly through the UI.
EIMU = "Elasticsearch Indexing & Mapping Utility"
Features
- Tools to map CMS data models to ES
- Nested & reusable mappings
- Hooks into CMS lifecycles
- Integrate multiple ES indexes
- Utilities for re-indexing & orphan detection
- Handling for special data types (e.g. geopoints)
- Export/import
- etc
Use cases
This plugin may be most effective in the following contexts:
- Frequent model changes - Any app development where data models change frequently (e.g. early in app development) and it makes sense to just do it through UI
- Only basic ES needed - Anytime basic ES features are enough; no need for code
- Learning & exploration - A dev wants to learn ES and be gradually exposed to it
Note that this plugin only covers basic ES features and does not cover the full spectrum of Elasticsearch capabilities.
Often ES is used in big-traffic/big-data contexts, where it's a critical piece of the entire system, and as such it's normal, and expected, to have the presence of specialized ES developers and continual management of the tech. In these contexts, work on ES is often done through code and configuration files, as opposed to entirely via a dashboard UI.
ES is power
Elasticsearch is essentially a high-performance cache layer for any database, is optimized for (organic) search and the pulling of massive amounts of records at insane speeds. As well, it helps to think of it as a managed "mirror" reflection (full or partial) of a database.
You'll find it, and competing technologies like OpenSearch, Algolia, etc, powering search systems for all major platforms (e.g. Amazon, Airbnb, Google, etc), but also a full spectrum of small-to-large cases in ecommerce, knowledge bases, social media, etc. The technology is deep and an entire industry surrounds it.
Multiple birds, one stone
In developing this plugin, from the outset I had 3 goals in mind:
- Learn Strapi plugin development
- Re-sharpen myself on ReactJS
- Get more intimate with Elasticsearch
On all counts I feel satisfied!
Naturally, the journey had pitfalls.
Along the way, I would say the clearest challenge was using Strapi's UI system, which seems to not be fully documented and/or disjointed versions. A lot of time was spent exploring the github repo's of other Strapi projects to see how certain components were used.
Additionally, I did not start with any defined designs or hard requirements. These aspects were discovered along the way as I swam deeper into the depths. Shooting from the hip here was effective given the timeline (weeks).
The plugin's future
- Conversion to Strapi 5
- Support multiple ES versions (e.g. 7, 8, 9)
- Support for OpenSearch (a fork of ES)
- Support for static dictionaries (e.g. a local JSON dictionary in the front-end of an app); not-ES