How to use this demo

⚠️ Disclaimer: Only tested with Meilisearch, Windows 11 and Docker Desktop.

1. Have a running instance of your search service

Example: Meilisearch running as a separate docker container and available at http://localhost:7700

Remark: All get master API key that setup to MeiliSearch and then request admin API key for setup in step 2. (your-api-key)

2. Modify the searchsync.config.cjs

server: {
    type: 'meilisearch',
    host: 'http://host.docker.internal:7700',   // accessing localhost within a container
    key: '<your-api-key>',
  },
   reindexOnStart: true,                        // Need ""true" for this tutorial
   collections: {
    test_collection: {                          // name of the directus-collection
      fields: ['title', 'description'],         // fields of the directus-collection
    },
  },

3. Run docker-compose.yml with build flag

docker compose -f docker-compose.yml up --build

4. Check - Loaded extensions & notice the warning

step_4_notice_warning

If you see this, you know all is fine. We haven't created the collection yet.

5. Login to Directus with http://localhost:8055

// Initial values from .env

ADMIN_EMAIL=admin@example.com
ADMIN_PASSWORD=123qweasd

6. Create collection and fields

step_6_create_collection

7. Create first item

step_7_item

8. Restart Docker Containers

Stop containers:

pressing CTRL+C (Windows) to cancel running command

Start containers:

docker compose -f docker-compose.yml up

9. Check - No warning

step_9_check

10. Check - Meilisearch Dashboard at http://localhost:7700

You should find the collection "test_collection" as an available index. When selected, we should see our item.

step_10_meilisearch