Skip to content

Strapi 5 connection with updateEntriesInMeilisearch does not work #1045

@ps-20x

Description

@ps-20x

Description
Currently when using updateEntriesInMeilisearch the entries do not get updated because the get removed in the loop of removeUnpublishedArticles because publishedAt is set to null in strapi 5 also for published articles.

Expected behavior
The entries are updated correctly

Current behavior
The entries get removed from the index.

Screenshots or Logs
Using this code is my current temporary fix

await meilisearch.updateEntriesInMeilisearch({
  contentType,
  entries: entries.map((entry) => ({
    ...entry,
    publishedAt: new Date(),
  })),
});

Environment (please complete the following information):

  • Meilisearch version: v.1.15.0
  • strapi-plugin-meilisearch version: v0.13.3
  • Strapi version: v5.23.3

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinggood first issueGood for newcomers

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions