You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For some reason, these checks are done one entry at the time and if the entry should not be in Meilisearch, it is deleted. The deletion happens even if the entry was not already present in Meilisearch. This is done to avoid having to first getting the document in Meilisearch and then delete it. Problem is, the entries are deleted one by one. Thus, if you update X documents that are in draft mode for example, they are deleted one by one from Meilisearch. So, X requests are made to Meilisearch.
Now, instead of deleting them one by one, the entries that should be deleted should be deleted in one batch.
Instead of doing this:
See #611
Currently when you update multiple entries, it trigger the
afterUpdateMany
lifecycle.strapi-plugin-meilisearch/server/services/lifecycle/lifecycle.js
Line 75 in f322bec
This lifecycle uses
strapi-plugin-meilisearch/server/services/meilisearch/connector.js
Line 111 in f322bec
To ensure the entry should be present in Meilisearch, the above function uses
sanitizeEntries
strapi-plugin-meilisearch/server/services/meilisearch/connector.js
Line 119 in f322bec
For some reason, these checks are done one entry at the time and if the entry should not be in Meilisearch, it is deleted. The deletion happens even if the entry was not already present in Meilisearch. This is done to avoid having to first getting the document in Meilisearch and then delete it. Problem is, the entries are deleted one by one. Thus, if you update X documents that are in draft mode for example, they are deleted one by one from Meilisearch. So, X requests are made to Meilisearch.
Now, instead of deleting them one by one, the entries that should be deleted should be deleted in one batch.
Instead of doing this:
strapi-plugin-meilisearch/server/services/meilisearch/connector.js
Line 126 in f322bec
We should use
deleteDocuments
.The text was updated successfully, but these errors were encountered: