MeiliSearch
Headsup
Section titled “Headsup”This guide is intended for older Foundation projects that are not using Strapi V5. If you are using Foundation 3.0 or later, you should use the built-in Meilisearch integration instead.
What is Meilisearch
Section titled “What is Meilisearch”Meilisearch is an open-source, fast, and easy-to-use search engine that allows you to add powerful full-text search capabilities to your applications. It is designed to deliver relevant search results quickly, even with large datasets, and provides features like typo tolerance, filters, and faceted search.
How to setup?
Section titled “How to setup?”-
Create a new project
a. Template:
EF2 meilisearch with supervisor
b. Name:
%PROJECT_NAME% - Search
(e.g: vandervalkdegroot - Search) -
Grant yourself access. Go to: Toegang > Rollen toevoegen > check Beheerder and save
-
Add a domain name to the project. Preferably use the subdomain search (e.g.:
search.vandervalkdegroot.bee.ef2.builders
). -
Make sure the subdomain actually points to the server by correctly configuring the DNS settings.
-
Log in to the server via SSH.
-
Create the “meilisearch” directory:
create meilisearch via SSH mkdir meilisearchcreate meilisearch via SSH from project directory mkdir /projects/{{project_name}}/meilisearch -
Navigate to the newly created directory:
cd meilisearch
-
Install Meilisearch
Install Meilisearch curl -L https://install.meilisearch.com | sh -
Restart the Supervisor process
Copy the project ID from Rootnet
restart meilisearch supervisorctl -c /etc/projects/supervisor/{{project_from_rootnet}}.conf restart meilisearchYou may encounter an error, but don’t panic as long as the service restarts. Otherwise you should panic!
meilisearch not running error meilisearch: ERROR (not running)meilisearch: started -
To proceed, you will need the
MASTER_KEY
of Meilisearch.You can find it in the Supervisor config:
cat /etc/projects/supervisor/-{{project_name}}.conf
and search forMASTER_KEY
. If this is not working you can use Postman or any other service to get this.Go to
https://search.{{project_name}}.bee.ef2.builders/keys
add the bearer token in Authorization > Bearer Token -
With the help of the API key(s) and the associated domain name, you should now be able to connect to Meilisearch.
-
You can now use:
You can now use the URL, for example:
search.{{project_id_from_rootnet}}.bee.ef2.builders
, as the Meilisearch URL.