directus-extension-searchsync icon indicating copy to clipboard operation
directus-extension-searchsync copied to clipboard

Meilisearch deleteItems deletes the entire index

Open romajs opened this issue 5 months ago • 0 comments

This line is wrong: https://github.com/dimitrov-adrian/directus-extension-searchsync/blob/main/lib/indexers/meilisearch.js#L47

Current:

await axios.delete(`${config.host}/indexes/${collection}`, axiosConfig);

It should be:

await axios.delete(`${config.host}/indexes/${collection}/documents`, axiosConfig);

Instead of deleting the index documents it's deleting the entire index. 😢

romajs avatar Jan 25 '24 21:01 romajs