Skip to content

updateContentTypeInMeiliSearch duplicates lifecycle methods #925

Open
@jbendkowski

Description

@jbendkowski

Description
Based on my experience with the Meilisearch plugin, it appears that multiple invocations of the service updateContentTypeInMeiliSearch method (which adds all entries from a contentType) cause each index update to be executed as many times as the addContentTypeInMeiliSearch method has been called since the server was started. I suggest adding a check to skip lifecycle subscriptions if the contentType has already been added. This could prevent the duplication of lifecycle methods and ensure that each index update is only executed once.

Environment:

  • OS: Windows 10
  • strapi-plugin-meilisearch version: 0.12.0
  • Strapi version: 4.24.2

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions