Skip to content

Latest commit

 

History

History

meilisearch-index-generator

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Meilisearch index creator

This cli tool creates meilisearch index, that our api uses to implement the global search

How to use

To run the cli, you must ssh to the droplet where our meilisearch instance is being deployed (contact an admin to get access to the droplet)

$> ssh <instance_host>

Then clone this repository :

$> git clone <this_repository>

Once you have downloaded the repository you will need to setup some cli secrets:

  • Add in the root of the cloned repository a .secrets folder then add a .secrets/service-account.json in this folder (contact an admin)
  • Add meilisearch master key : add this line export MEILISEARCH_MASTER_KEY=<your_master_key> in your ~/.bashrc (contact an admin) . The key might be set in your droplet /etc/systemd/system/meilisearch.service file

Run the cli:

When you are ready run the cli

$> make run

Run locally

To run the cli locally it is important that you install and run meilisearch as such

$> curl -L https://install.meilisearch.com | sh
$> ./meilisearch

now that an instance of mielisearch is running you can run the command as usual

$> make run

Test locally:

you can test meilisearch locally by running the following command

$> curl -vsS -X GET https://127.0.0.1:7700/indexes
$> curl -vsS -X GET https://127.0.0.1:7700/indexes/github_users/search -d'{"q": sanix}'

with api key:

$> export MEILISEARCH_MASTER_KEY=<your_master_key>
$> curl -vsS -X GET https://127.0.0.1:7700/indexes/github_users/search -d'{"q": "sanix"}' -H "X-Meili-API-Key: $MIELISEARCH_MASTER_KEY"