Releases: meilisearch/strapi-plugin-meilisearch
v0.6.5 🚀
🚀 Enhancements
- Add populateEntryRule in plugin's settings (#427) @bidoubiwa
Thanks again to @bidoubiwa and @nicolasvienot! 🎉
v0.6.4 🚀
This version makes this package compatible with Meilisearch v0.27.0 🎉
Check out the changelog of Meilisearch v0.27.0 for more information on the changes.
🚀 Enhancements
- Update plugin label name (#412) @dzcpy
- Fix entries that were added/updated only partially in Meilisearch (#410) @nhvu1988
Thanks again to @bidoubiwa, @dzcpy, and @nhvu1988! 🎉
v0.6.3 🚀
🚀 Enhancements
- Change
transformEntryfunction inplugin.jsto async function (#387) @dzcpy - Make
filterEntryasync compatible infilterEntriesfunction inconfig.js(#395) @nicolasvienot
🐛 Bug Fixes
- Avoid indexing un-published entries (#400) @bidoubiwa
- Fix re-subscribing of the same content type on every addition (#397) @bidoubiwa
Thanks again to @bidoubiwa, @dzcpy and @nicolasvienot! 🎉
v0.6.2 🚀
🔥 Strapi V4 compatibility !! 🔥
⚠️ Breaking changes
- Make plugin compatible with version 4 of Strapi (#357) @bidoubiwa
Hello everyone! This release marks the compatibility with v4 of Strapi. All versions from now on ( v0.6.x and higher ) will only be compatible with v4 of Strapi. If you still want to download the v3 version you can access it using the @strapi_v3 tag on npm
# v4
yarn add strapi-plugin-meilisearch
# v3
yarn add strapi-plugin-meilisearch@strapi_v3
Because the breaking changes are linked to the breaking changes between Strapi v3 and Strapi v4, I suggest that you read the README.md file to find out how the strapi-plugin-meilisearch works in a Strapi V4 environment!
🐛 Bug Fixes
- Change files field (#359) @bidoubiwa
- Move utils into server directory (#360) @bidoubiwa
Thanks again to @bidoubiwa! 🎉
v0.5.1 🚀
This release is pushed on the v3_strapi tag in npm. It does not support Strapi v4!
To update the release:
# With yarn
yarn upgrade strapi-plugin-meilisearch@strapi_v3
# With npm
npm update strapi-plugin-meilisearch@strapi_v3
Thanks again to @bidoubiwa, @curquiza! 🎉
v0.5.0 🚀
This package version is compatible with MeiliSearch v0.25.0 🎉
⚠️ Breaking changes
- This package uses meilisearch-js v0.24.0 that only works with MeiliSearch v0.25.0. It means this strapi-plugin-meilisearch version is only compatible with MeiliSearch v0.25.0 and later, but not with v0.24.0 and older. Be sure you are using at least MeiliSearch v0.25.0 or newer before doing the upgrade.
Thanks again to @v4dkou, @bidoubiwa and @curquiza! 🎉
v0.4.1 🚀
v0.4.0 🚀
This package version is compatible with MeiliSearch v0.24.0 🎉
⚠️ Breaking changes
- The plugin only works with MeiliSearch v0.24.0. If you are still using MeiliSearch v0.23.0 or lower, you'll need to update.
- Bind multiple collection to the same index (#309) @bidoubiwa
🚀 Enhancements
- Add entries transformer before indexation (#287) @bidoubiwa
- Support for custom index name (#306) @bidoubiwa
- Bind multiple collection to the same index (#309) @bidoubiwa
- Raise document errors (#322) @bidoubiwa
- Remove action on row click instead of checkbox click (#323) @bidoubiwa
🐛 Bug Fixes
- Update Batch Size to Eliminate SQL Error SQLITE_ERROR: too many SQL variables (#301) @jbelke
- Fix empty collection not being able to be indexed in MeiliSearch (#321) @bidoubiwa
🔒 Security
- Restrict plugin usage to super-admin users (#316) @bidoubiwa
- Make it clear that the plugin uses a private meilisearch api key (#320) @bidoubiwa
Details
This section goes into the details of the release.
Features
- Custom configuration file
- Custom index name
- Multiple collections in one index
- Transform entries before indexation
- Permission system
- Error notification on failed entries indexation
Custom Configuration
Inside the api/[collection]/model folder of all existing collections, there is an associated [collection_name].js file. In this condiguration file it is now possible to add information about how your collection should act with MeiliSearch.
All possible configurations are explained in the next sections.
Example
// api/restaurant/models/restaurant.js
module.exports = {
meilisearch: {
// parameters
}
}Custom Index Name
Previously, when adding a collection to MeiliSearch you had no choice on the index naming, it was the same as the collection name.
For example, when adding the restaurant collection to MeiliSearch, the indexUid inside MeiliSearch would also be called restaurant.
With this new version, it is now possible to define a custom index name in your collections model options.
// api/restaurant/models/restaurant.js
module.exports = {
meilisearch: {
indexName: "my_restaurants"
}
}Multiple collections in the same index
You can point multiple collections to the same index.
For example if you want both entries from shoes and shirts to go to the same index, they need to share the same indexName, for example clothes.
// api/shoes/models/shoes.js
module.exports = {
meilisearch: {
indexName: "clothes"
}
}// api/shirts/models/shirts.js
module.exports = {
meilisearch: {
indexName: "clothes"
}
}Example with myCustomIndexName and both restaurant and review collection.
Transform sent data
Before, the whole entry of a collection was sent to MeiliSearch. Including all the sensitive fields about the authors for example. There was no way to decide which field to send to MeiliSearch.
It is now possible by setting a transformEntry function in the configuration file of the collection's model (lots of examples here)
Example to sanitize your field, and thus removing all sensitive data:
// api/restaurant/models/restaurant.js
const { sanitizeEntity } = require('strapi-utils')
module.exports = {
meilisearch: {
transformEntry({ entry, model }) {
return sanitizeEntity(entry, { model })
},
},
}For example, you can now:
- Remove specific rows,
- Sanitize the content of private fields
- Change the content of a field
id fields as it is possible your collections may be duplicated in an index.
Error notification on failed entries indexation
When indexing a collection by clicking on the un-checked you receive a notification when the index has been created successfully in MeiliSearch.
Nonetheless, if the entries addition fails, you receive no explanation as to why. The only information you see is that the counter stays at 0.
This release tracks the entries addition process and raises error notification as to why documents were not able to be added.
Better permission system
Since strapi-plugin-users-permissions is not a mandatory plugin, the new permission system is very basic. Now, You need to be an admin in the admin panel to access or use any of the API routes of the MeiliSearch plugin.
Use the checkbox to add collection instead of row
Previously, when clicking on the row of a collection, indexation or removal was triggered. This was non-intuitive and has been removed. Now to add or remove a collection from MeiliSearch you need to click on the checkbox
Clarity on different API keys
It was not clear that the plugin required either the master key or the private key to be able to use the plugin. This led to users using the same key in their front end to make search requests.
You need to use the public key in your front-end app and the private or master-key in Strapi. See keys documentation
Contributor
Thanks again to @bidoubiwa, @harish2704, @jbelke, @MattieBelt, @juanzgc ! 🎉
v0.3.3 🚀
v0.3.2 🚀
Changes
- Add possibility to configure via plugin config (#189) @sargreal
- Fix delete hook when triggered with checkbox (#177) @bidoubiwa
- Update package.json (#208) @bidoubiwa
Thanks again to @bidoubiwa, @curquiza, and @sargreal! 🎉

