strapi-plugin-meilisearch icon indicating copy to clipboard operation
strapi-plugin-meilisearch copied to clipboard

Unpublishing content type entry does not remove index unless you manually update it

Open Tocas97 opened this issue 2 years ago • 3 comments

Description Unpublishing a content type entry via the official Draft/Publish plugin causes an inconsistent behavior with the Meilisearch plugin. Unpublishing does not remove the entry from the index, unless the whole index is manually refreshed via the plugin's page. Publishing the entry does automatically add it, so this can not be solved with a publicationState property or similar.

Expected behavior Upon pressing the Unpublish button, the index for that entry should be automatically removed.

Current behavior Unpublishing an entry does not remove it remove it from the index automatically. When accessing the Meilisearch plugin page the indexed number of documents exceed the number of total documents (as seen in the screenshot below). This is not just a visual bug, the index is actually there.

Screenshots or Logs

image

Environment (please complete the following information):

  • OS: Windows 10 64-bit
  • MeiliSearch version: v0.24.0
  • strapi-plugin-meilisearch version: 0.4.1
  • Browser: Google Chrome Version 97.0.4692.71/
  • Strapi version: v3.6.8
  • Node version: 12.20.1

Tocas97 avatar Jan 12 '22 19:01 Tocas97

Hey @Tocas97 You are absolutely right. I forgot to add a listener to the unpublish action. Let me add that to the important features to add

bidoubiwa avatar Jan 27 '22 18:01 bidoubiwa

Sorry, this issue is not fixed yet. Tested on version 0.6.6.

vietlongn avatar Jun 30 '22 04:06 vietlongn

Hey @vietlongn I did not realize you were using strapi v3! The fix has been introduced in the plugin compatible with strapi v4.

Since there are a lot of users still using strapi v3, could you upvote this ?

https://github.com/meilisearch/strapi-plugin-meilisearch/issues/444

bidoubiwa avatar Jun 30 '22 13:06 bidoubiwa

Since v3 is not used a lot, this issue might not be relevant anymore. closing this. Feel free to re-open if it is still needed

bidoubiwa avatar Sep 27 '23 13:09 bidoubiwa