npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

directus-extension-meilisearch-connector

v1.0.3

Published

Meilisearch integration for Directus with real-time sync and hot-reloading.

Readme

Directus Meilisearch Extension

A powerful Directus extension to synchronize your content seamlessly with Meilisearch. It provides real-time updates, advanced filtering, and instant search capabilities for your Directus projects.

🌟 Key Features

  • Real-Time Synchronization: Create, update, or delete items in Directus, and they appear in Meilisearch instantly.
  • Hot-Reloading: Change your search settings on the fly. No need to restart your server when adding new collections or changing filters.
  • Smart Array Handling: Option to preserve JSON arrays (like tags or ingredients list) for better faceting and filtering.
  • Zero-Config Setup: Automatically creates the necessary settings collection in your Directus Admin Panel.
  • Manual Reindexing: Trigger a full reindex via the Admin Panel UI, CLI, or API.

🚀 Getting Started

1. Installation

Install the extension in your Directus project.

npm install directus-extension-meilisearch-connector
# or
pnpm add directus-extension-meilisearch-connector

2. Configuration

Once installed and Directus is running, navigate to the Content module. You will see a new collection called "Meilisearch Settings".

  1. Host: Enter your Meilisearch URL (e.g., http://localhost:7700 or http://meilisearch:7700 if using Docker/Podman).
  2. API Key: Enter your Meilisearch Master Key.
  3. Collections Configuration: Define which collections to index using JSON.

3. Example Configuration

In the Collections Configuration field, add your rules:

[
  {
    "collection": "recipes",
    "fields": ["id", "title", "description", "ingredients"],
    "queryFilter": { "status": { "_eq": "published" } },
    "actionFilter": { "status": { "_eq": "published" } },
    "preserveArrays": true
  }
]
  • fields: List of Directus fields to send to Meilisearch.
  • queryFilter: (Optional) Filter items during the initial reindex (e.g., only published items).
  • actionFilter: (Optional) Filter items during real-time updates.
  • preserveArrays: Set to true to keep lists (like tags) as arrays. If false (default), they are flattened.

🔄 Reindexing Data

If you have existing data, you can sync it all at once using one of these methods:

  • Admin Panel (Easiest): In the Meilisearch Settings item, toggle the "Start Reindexing" switch to ON and save. It will run in the background and turn itself off when done.
  • API: Send a POST request to /meilisearch/reindex (requires Admin Token).
  • CLI: Run npx directus meilisearch:reindex in your server terminal.

👏 Credits

This project is an improved version of the directus-extension-meilisearch-integration by Healios.

Major improvements in this version:

  • Eliminated the need to restart the server when changing settings.
  • Added an API Endpoint and UI Toggle for reindexing.
  • Added support for preserving array structures.
  • Improved error handling and system stability.