Search for Strapi content with Meilisearch

Index Strapi content in a self-hosted Meilisearch using the official plugin, with planned content types, fields, transforms and sync behavior. Confirm versions before you start.

On this page

How to add Meilisearch search to Strapi content

An editorial team or product owner usually needs site or app search over Strapi entries because the Strapi REST and GraphQL APIs filter and sort by known fields but do not answer free-text questions such as which articles mention a product, a regulation or a region across several content types. The official Meilisearch plugin for Strapi indexes selected content types into a Meilisearch instance that your team runs, and it targets Strapi 5. Projects still on Strapi v4 need an older plugin line (versions under v0.12), so confirm the Strapi version before you size the work. The plugin installation is the smallest part of the job. The larger part is deciding what gets indexed, because every content type, field and relation you add becomes data that must be kept current, reviewed for access and transformed into a document shape that search can use.

Start with a content inventory. For each candidate content type, decide which fields a searcher should match on, which fields are only displayed, and which must never leave Strapi, such as drafts, internal notes or fields that carry personal data. Relations and components need the same treatment, because a search hit on an article should show the author name or category label the reader expects, and that requires a deliberate transform step rather than a raw dump of the entry. Plan the index settings too: searchable attributes, filterable attributes for facets such as locale or publication date, and the ranking rules your editors will test against. Meilisearch's index model and the plugin's configuration keys decide how much of this is set in Strapi and how much is set in Meilisearch, so read the plugin README for the version you run. The README at the plugin repository is the place to confirm how entry create, update and delete events reach the index, which content types and status states the sync covers, and how filtering is configured. Do not assume those behaviors from a previous version.

What you need before installing the plugin

The Meilisearch plugin depends on a chain of versions: Strapi, Node.js, the plugin itself and the Meilisearch server. Each link needs to be settled before you install anything, because a mismatch in one layer tends to surface as a failed indexing job rather than a clear error. The cards below cover what to pin, what to confirm and what to decide about hosting.

Strapi 5.45.0 or later

The plugin for Strapi 5 requires Strapi 5.45.0 or later. Check the version in your project's package.json and upgrade before adding the plugin if you are behind. Strapi 5 minor releases ship frequently, so pin an exact version in your lockfile and record which Strapi release your indexing was tested against. If your project still runs Strapi v4, the plugin line you need is different, covered in a separate card.

Node.js 20 or later

The plugin needs Node.js 20 or later. Strapi itself runs only on Active or Maintenance LTS Node.js versions, so confirm that your chosen Node.js release satisfies both the plugin and Strapi's own requirement before you build your container image or CI runner. Mismatched Node.js versions in development, CI and production are a common cause of install failures that look like plugin bugs.

Strapi installation requirements

Supported database for Strapi 5

Strapi 5 supports PostgreSQL 14 or later, MySQL 8.0 or later, MariaDB 10.3 or later and SQLite 3. It does not support MongoDB or other NoSQL databases. The Meilisearch plugin does not change this requirement, but it adds index state to your operations, so confirm your database and backup approach before the first full index build. Meilisearch holds a copy of your content, not the source of truth.

Meilisearch v1.x server

The plugin works with Meilisearch v1.x. Decide whether you will run Meilisearch on a server you control, in a container next to Strapi, or on a separate host. Size storage and memory for the indexed content, not the full database, and plan how you will restart and restore the search service. Confirm the Meilisearch version your plugin release is tested against before you upgrade either side.

Network path from Strapi to Meilisearch

Strapi must reach the Meilisearch HTTP endpoint from the process that runs lifecycle hooks and any scheduled sync jobs. In containerized or Kubernetes setups, check service names, DNS, network policies and TLS termination between the two. Also confirm that browsers never call Meilisearch directly unless you have decided to expose search that way, since that choice changes which keys are public.

Master key and API key plan

Meilisearch protects its API with a master key, and it can issue scoped API keys for specific operations. Decide before installation who holds the master key, where it is stored, and which key the plugin uses for indexing versus search. Keep the master key out of front-end bundles and source control, and rotate keys through your secrets process rather than by editing configuration files on servers.

Confirm the compatibility table

Before pinning any version, open the compatibility information in the plugin README and check the current Meilisearch and plugin pairing, since support can change between releases. Record the exact Strapi, Node.js, plugin and Meilisearch versions you tested together. Treat that record as part of your change process so upgrades of any one layer are tested against the others.

Plugin README

How to configure the Meilisearch plugin in order

This sequence takes a Strapi project from a running Meilisearch instance to verified search results, with one content type indexed first so any fault is easy to isolate. Each step ends with a check you can confirm before moving on.

  1. Confirm versions and runtime requirements

    Before installing anything, confirm that your Strapi project is on Strapi 5.45.0 or later and that Node.js is version 20 or later, and that the Meilisearch server you plan to use is a v1.x release. Strapi v4 projects need plugin versions under v0.12 instead. Check these against the plugin README and your environment. You are done when the Strapi version, Node.js version and Meilisearch version are written down in your change record and match the supported combination.

  2. Run Meilisearch in the target environment

    Start a self-hosted Meilisearch v1.x instance in the environment where the search will run, with a master key set and storage on a persistent volume. Your infrastructure or platform team typically owns this step. Confirm that the health endpoint returns a healthy status from the Strapi host's network, and record the internal URL and the key that Strapi will use. You are done when a request from the Strapi server to the health endpoint succeeds.

  3. Install the plugin in the Strapi project

    In the Strapi project, install the Meilisearch plugin from its maintained package and rebuild the admin panel so the plugin appears in the admin interface. Use the version that matches your Strapi release from the plugin README. Start the project in development mode and confirm that the plugin's settings screen loads without errors. You are done when the project starts cleanly and the plugin is visible in the admin panel.

  4. Set host and API key through environment variables

    Add the Meilisearch host and API key to the environment file or secret store for each environment, rather than writing them into configuration files committed to source control. Use a key with only the permissions the plugin needs, and keep the master key out of the application. Restart Strapi and confirm the plugin connects to the instance. You are done when the plugin reports a connection to Meilisearch and no credentials appear in the repository.

  5. Choose one content type to index first

    Select a single collection type with a clear public purpose, such as articles, and leave the others unindexed for now. Limiting the first run to one content type keeps troubleshooting simple, because any mismatch in fields, permissions or data can be traced to one schema. Note the content type's name and the number of published entries it holds. You are done when the content type is enabled for indexing and nothing else is.

  6. Define the indexed fields and transform entries

    In the plugin settings for that content type, list only the fields that search users need, such as title, summary and category, and exclude internal or personal fields. Where a field is a relation or a component, decide how it will be flattened into text the index can match. Save the configuration and review it with the content owner. You are done when the field list is documented and a reviewer has confirmed that no restricted data is included.

  7. Run the initial index and compare counts

    Trigger the initial indexing for the chosen content type from the plugin, then open the Meilisearch index statistics. The document count should match the number of published entries you recorded in the earlier step, and draft entries should not appear unless you intended them to. If the counts differ, check publication status and the field transformation before re-running. You are done when the index count matches the published entries.

  8. Verify search results from the API

    Run test queries against the Meilisearch search endpoint with a search key, using terms taken from known entries. Confirm that each query returns the expected document IDs and that a term from an excluded field does not match. Then trigger an edit and a delete in Strapi and confirm the index updates after each change. You are done when the test queries return the expected IDs and the index reflects edits and deletions.

Which content types and fields to index

The first decision is whether a content type should reach the index at all. Anything indexed becomes reachable through the search endpoint, so the question is who should be able to find each entry, not only whether a page displays it. Public marketing pages and published articles usually belong in the index. Drafts, internal notes, unpublished releases and records that only signed-in users may read need a separate answer, because the search endpoint may not apply the same permissions as the content API. Confirm in the plugin documentation how it handles draft versus published versions and whether it filters by role.

  • Published only: Index published versions and confirm that draft changes do not appear in search results before editors approve them.
  • Restricted types: Keep internal types, such as staff directories or pricing exceptions, out of the index unless a separate search instance with its own access control is planned.
  • Authenticated content: Content that only signed-in end users can read should be tested against the search endpoint, since public search keys can expose it.
  • Removal behavior: Check that unpublishing or deleting an entry removes it from the index, and that the removal runs under the same conditions as the sync.
  • Written sign-off: Record which types are public, restricted and excluded, with the owner of each decision.

Before go-live, run a search with an unauthenticated key for each restricted type and confirm no record appears.

How to transform entries before they reach the index

The stored shape of a Strapi entry rarely matches what a search interface needs. An article in the database may hold a relation to an author, a set of components for sections, a dynamic zone for mixed blocks, and rich text bodies stored as markup. A search box, however, needs a flat document with a title, a short summary, plain text for matching, a category label people can filter on, and a locale value that tells the front end which language to show. Deciding how each of these is produced is the core design task of the Meilisearch integration, and it should happen before anyone configures the index. Flatten relations to the values users search or filter by, such as an author's display name rather than an object reference. Resolve components and dynamic zones into one text field per meaningful block, and decide which block types are searchable at all. Extract plain text from rich text, stripping markup, embedded media and navigation-only content so that matches come from prose.

Treat every field in the search document as a design decision with a named owner. The content team usually owns which fields are indexed and how categories are labeled, the front-end team owns the shape the search UI reads, and the platform team owns the code that runs the transform and its behavior when a relation is empty or a component is missing. Computed fields such as a locale label or a category display name are the most common source of drift, because they depend on values that editors can change. Write down the source field, the rule, the fallback, and who approves a change for each one. Then confirm how the plugin exposes transformation for the version you run. The Meilisearch Strapi plugin documents its own configuration and hooks, and the exact option names and their behavior change between releases, so check the plugin README for your plugin version rather than assuming a particular API. Test the transform against real entries in a staging environment, including drafts, unpublished locales and entries with empty relations, before you accept the document shape.

How Strapi fields map to index documents

This table compares each Strapi source field or relation with the Meilisearch index attribute it becomes, whether it is searched or filtered, and who signs off. Read the rows as illustrative starting points, then confirm each one against your own content model. Treat the mapping as a reviewed contract: rerun this review whenever a content type changes schema.

Strapi sourceIndex attributeSearch or filter useApproval owner
Title (text field)titleSearchable, ranked highContent lead
Slug (UID field)slugFilterable for URL lookup, not searchableFront-end developer
Locale (localization)localeFilterable so each language queries its own documentsLocalization manager
Publish state (draft or published)publishedAtFilterable, indexes published entries onlyEditorial lead
Category relation (many to one)category.nameFilterable and searchable, names onlyInformation architect
Cover image (media reference)coverImageUrlNeither searched nor filtered, returned for displayFront-end developer
Body (rich text or blocks)bodyTextSearchable after conversion to plain textSecurity reviewer for exposed content
Internal notes (private text field)Not indexedExcluded from all index documentsCompliance owner

How indexes stay in sync with content changes

A Meilisearch index is a copy of Strapi content, so every create, edit, publish, delete and schema change has to reach it. The cards below cover the sync paths that need a decision and a test before launch, and the drift that appears when one of them silently fails.

Create and publish events

A new entry should appear in the index only when editors intend it to be searchable, which usually means after publication rather than on first save. Decide whether draft content is indexed at all, then confirm in the plugin README how the plugin reacts to Strapi 5 draft and publish behavior. Test by creating a draft, publishing it, and checking that the document appears in Meilisearch with the expected fields and no unpublished duplicates.

Plugin README

Update and unpublish paths

Edits to a title, a related component or a dynamic zone must refresh the stored document, and unpublishing must remove it from search results. A missed update leaves stale text that users still find, which is often worse than a missing result. Test an edit to each indexed field type, then unpublish the entry and confirm it no longer returns in a search query.

Deletions and orphaned documents

Deleting an entry in the admin panel must also delete its search document, or the index will return content that no longer exists and may link to a removed page. Check bulk deletes, deletes triggered through the API and deletes of entries that were never published. Test by deleting a published entry through each path and confirming the search hit disappears.

Bulk reindexing after schema changes

Adding, renaming or removing an indexed field changes the document shape, so existing documents need a full rebuild rather than incremental updates. Plan the reindex as a scheduled operation, confirm which fields the plugin rebuilds, and agree the window during which search may show mixed shapes. Rehearse the reindex on a copy of the production database and record how long it takes on your data.

Drift detection between Strapi and the index

Webhook failures, network timeouts and deployments that stop the server mid-sync can leave the index different from the database without any error in the editor. Schedule a comparison of document counts and sample IDs between Strapi and Meilisearch, and alert when they diverge. Test drift deliberately by stopping Meilisearch during an edit, then confirm the comparison finds the gap and that the reindex repairs it.

Questions teams ask before adding Meilisearch to Strapi

Does the Meilisearch plugin work with Strapi v4?

Yes, but only with an older plugin line. Strapi v4 projects use plugin versions under v0.12, while the current plugin line supports Strapi 5.45.0 or later and Meilisearch v1.x on Node.js 20 or later. Strapi v4 reached end of life on April 30, 2026, so a v4 project that adds search is also a good moment to plan the move to Strapi 5. Check the plugin README for the exact compatibility table before you pin a version, because a v4 project on an old plugin line will need its own upgrade path later.

How much effort does a Meilisearch integration take, and what drives it?

The effort depends mostly on how many content types you index, how much each entry must be reshaped before it reaches the index, and how many relations and components the search results need. The plugin setup itself is small. The larger items are choosing which fields are searchable, filterable and sortable, writing transforms for components and dynamic zones, handling draft and published states, and planning the first full reindex. Ask any partner to break the work into those parts in a written scope rather than give a single number.

What are the main cost drivers for a Meilisearch project?

The main drivers are the number of content types, the complexity of transforms, the number of environments that need their own indexes, and the hosting you choose for Meilisearch. Each content type adds field mapping and test cases. Each transform that flattens relations or resolves media adds code to maintain. Costs recur through hosting, monitoring, Strapi upgrades and changes to the schema, so ask a quote to separate one-time build work from ongoing support.

Can our own team build this without a partner?

Often yes, if an engineer who knows Strapi lifecycle hooks and Meilisearch index settings owns the work. The plugin documentation covers installation and basic configuration. The harder parts are judgment calls: which fields belong in the index, how to keep search results aligned with Strapi permissions, and how to recover when an index falls out of sync. Teams without that experience usually benefit from a short design review before building, whether or not they hire a partner for the full implementation.

What does our side need to provide for the project?

You need content owners who can confirm which content types and fields users should find, and who can review sample search results. You need an engineer who can provision a Meilisearch instance in infrastructure you control, with backups and network access from Strapi. Your security team should review the API keys, which key Strapi uses, who can reach the Meilisearch port, and whether unpublished or restricted content can ever appear in results. Agree these owners in the written scope before work starts.

Does search expose content that users should not see?

It can, if the index receives data that Strapi permissions would hide from the reader. Search results bypass Strapi's normal response path, so the team must decide what enters the index, whether draft content is excluded, and how the front end filters results. Confirm this with a test that signs in as a restricted user and checks that results match what the REST API returns for that user. Document the decision so that a later security review can follow it.

What should a quote for this work include?

A useful quote lists the content types in scope, the fields to index and the transforms to build, the Strapi and Meilisearch versions and hosting model, the environments covered, the sync and reindex approach, and the tests and handover. It should also name what is excluded, such as front-end search UI, and what recurs after launch, such as upgrades and monitoring. DeployOpen does not publish a price list, so ask for a written scope that a quote follows from.

How Strapi, the plugin and Meilisearch exchange data

The flow starts when an editor publishes an entry in the Strapi admin panel. The Meilisearch plugin, running inside the Strapi project, reads the configured content types and fields, transforms each entry into a search document, and sends it to the self-hosted Meilisearch instance. A site or app then sends search queries directly to Meilisearch, not to Strapi. Check which side of the trust boundary the admin panel and the search host sit on, and confirm that the API key the plugin uses is scoped to indexing.

Publishing flows from the Strapi admin through the plugin into Meilisearch, which serves queries.

Common Meilisearch sync and search failures

This table lists the failures teams most often hit when connecting the Meilisearch plugin to Strapi, with the likely cause and the check that confirms it. Read each row as a diagnostic path: verify the versions and connection first, then the index settings and content filters, then sync behavior after bulk edits or schema changes.

FailureLikely causeFix and verification
Plugin fails to load or indexing errors on startStrapi, Node.js and plugin versions do not match: the plugin needs Strapi 5.45.0 or later and Node.js 20 or later, and Strapi v4 projects need plugin versions under v0.12Check the Strapi version, the Node.js version and the installed plugin version against the plugin README before debugging code
Requests rejected with an authorization errorMissing or wrong Meilisearch API key in the Strapi environment, or a key without rights for the index operations the plugin runsConfirm the key variable is set in the Strapi environment and test it with a direct call to the Meilisearch host from the same machine or container
Strapi cannot reach MeilisearchThe host is set to localhost inside a container, the port is not published, or a proxy or network policy blocks the pathRun a health request to the configured host from inside the Strapi container, not from your laptop, and correct the host address in the environment
Draft entries appear in search resultsDraft and publish handling is not set for the content type, or the query fetches draft versions instead of published entriesIndex only published entries, then search for a known draft title and confirm it returns nothing on the public search endpoint
Results are stale after bulk editsBulk imports, data transfers or scripted updates bypass the lifecycle events that trigger index updatesRun a full reindex after bulk work, then compare document counts in Strapi and Meilisearch for each indexed type
Empty index after a schema changeA field was renamed, removed or added to the indexed set, and the index still holds the old mapping or the new field was never populatedReview the content type and field selection in the plugin configuration, rebuild the index for that type, and check a sample document for the expected attributes
Search returns unexpected matches or misses fieldsSearchable, filterable or sortable attributes are not set in the Meilisearch index settings, or transformed fields are missing from the documentInspect the index settings and one indexed document, then test a query for each field editors expect to find

Securing the search endpoint and index data

A Meilisearch index holds a copy of whatever the plugin sends it, so the search layer needs the same access review as the CMS itself. The cards below cover the keys, the network path, the fields and the permission model that decide what a visitor can reach through search. Confirm each setting against the plugin README and the Meilisearch documentation for your exact versions before go-live.

Separate the master and search keys

The master key in Meilisearch grants full control of the instance, including creating and deleting indexes and managing other keys. The Strapi side should hold only the credentials the plugin needs to write and sync documents, and the front end should use a search-only key with read access to the index it queries. Never place the master key in browser code or public environment variables. Ask your team to confirm which key the plugin configuration expects in your version, and where each key is stored and rotated.

Plugin README

Limit public search to published fields

Search results reach anonymous visitors if the index contains fields that the public API never returns. Check that the indexed documents only include fields that are published and visible under the Strapi public role, and that drafts are excluded from the index. A search hit that exposes a field the REST API hides is a leak even though the CMS itself is protected. Test with an unauthenticated search request and compare the returned fields against the public API response.

Keep the Meilisearch host off the public internet

Strapi needs to reach Meilisearch to sync documents, while browsers should only reach it through a controlled path. Where your architecture allows, bind the Meilisearch service to a private network, place it behind a reverse proxy that exposes only the search route, and restrict administrative endpoints to internal addresses. Confirm with your platform team which network paths your front end, Strapi and Meilisearch need, and whether the search key alone is acceptable for browser traffic in your environment.

Review indexed fields for personal data

Fields such as author email addresses, customer names, internal notes or phone numbers often sit in content types that editors never meant to publish. Once indexed, they are searchable by anyone holding a search key and may persist in the index after the source entry changes if sync is misconfigured. List every field the plugin will index, classify it, and remove personal data that search does not need. Your privacy team should sign off on the list before launch.

Apply the Strapi permissions model to indexing

Strapi's roles and permissions decide what the REST and GraphQL APIs return, but an index is a separate store with its own access path. Decide which content types are searchable for each audience, and confirm that anonymous search does not return entries that the public role cannot read, including relation fields that pull in restricted data. Document this mapping as part of your content model review, and retest it whenever a role or content type changes.

Verify and document each setting

Security settings in the plugin and in Meilisearch change between versions, so a configuration that worked in one release may not match the next. Write down the Strapi version, plugin version, Meilisearch version and the key and network setup for each environment. Repeat the unauthenticated search test after every upgrade and after any change to content types or fields. Ask your team to check each item against the plugin README and the Meilisearch documentation for those versions.

How to test search results before launch

Test the index against the content editors actually publish before anyone relies on search. Start with count checks: for each indexed content type, compare the number of published entries in Strapi with the number of documents in the matching Meilisearch index, and repeat the comparison after a full reindex in staging. A mismatch usually points to a content type or locale that was left out of the plugin configuration, or to entries that were filtered by a lifecycle rule. Record the expected counts per index so the check can be rerun without rebuilding the reasoning from scratch.

Next, confirm that drafts and unpublished entries are absent from the search index. Query for a draft title, then publish and unpublish a test entry and check the index after each step. Then exercise the write paths the plugin depends on: update an entry and confirm the change appears in the search results, delete an entry and confirm it is removed, and change a field that is mapped into the index and confirm the new schema shape is correct. Run one full reindex in a staging environment that mirrors production content volume, and confirm the results match the earlier checks. Confirm the exact sync behavior with the plugin README, since it defines which lifecycle events trigger updates.

Relevance testing needs a fixed query set. Write twenty to thirty representative queries with the results you expect for each, including exact titles, misspellings, and terms that appear only in fields you chose to index. Keep the expected results in version control next to the plugin configuration. Rerun the set after every Strapi minor release and every plugin update, because a changed ranking or a renamed field can look like a working search until a user notices. Strapi 5 minor releases ship frequently, so schedule the rerun as part of the upgrade checklist rather than as an occasional exercise.

How DeployOpen scopes and delivers Strapi search work

DeployOpen plans, implements, integrates, documents and supports self-hosted open-source platforms inside the client's own infrastructure. For Search for Strapi content with Meilisearch, we start from a written scope that names the content types, fields, Meilisearch environment and sync behavior before any build begins.

How we scope

  • Agree in writing which Strapi content types and fields go into each Meilisearch index.
  • Confirm Strapi 5 version, Node.js version and the Meilisearch v1.x environment that will host the indexes.
  • Define transformation rules, draft and publish handling, and who reviews the scope before work starts.

How we build

  • Configure the official Meilisearch plugin in a staging Strapi project and set index settings per content type.
  • Write and test entry transformation so search results expose only the fields editors and visitors should see.
  • Verify create, update, publish and delete events keep indexes in sync, then test a full reindex from the Strapi project.

How we hand over

  • Document the content type mapping, index settings, transformation logic and environment variables for your team.
  • Walk your engineers through reindexing, troubleshooting sync gaps and adding new content types later.
  • Deliver the written configuration and test results in your repository and infrastructure, under your control.

How we support

  • Engagements are fixed-scope, and changes to fields or indexes are priced through a written change to scope.
  • Ongoing support, plugin and Strapi upgrades, and continuous checks are available as a retainer.
  • Confirm with us the retainer terms, response expectations and upgrade coverage before the handover date.

Sources and further reading

Talk to our team.

Tell us what you're working on, whether it's a deployment, an audit, a security test or a cyber range. You'll speak with an engineer who can help you scope it.

  • 30-minute call: free, with no obligation.
  • NDA on request: we can sign before you share details.
  • Clear next steps: a scope and plan after the call.