Releases: meilisearch/strapi-plugin-meilisearch
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! 🎉
v0.3.1 🚀
v0.3.0 🚀
Changes
- Update strapi to support v3.6 (#157) @bidoubiwa
Breaking changes ⚠️
- Upgrade Cypress and remove node 10 testing (#158) @bidoubiwa
Thanks again to @bidoubiwa, ! 🎉
v0.2.1 🚀
Changes
- Fix plugin failing when single types exist (#123) @bidoubiwa
Thanks again to @bidoubiwa, @curquiza,! 🎉
v0.2.0 🚀
Changes
- Add base architecture (#1) @bidoubiwa
- Create plugin (#19) @bidoubiwa
- Add communication and ui elements (#36) @bidoubiwa
- Implements communication between strapi and meilisearch (#45) @bidoubiwa
- Add hooks (#77) @bidoubiwa
- Batch add documents and add UI preview of process (#106) @bidoubiwa
Thanks again to @LtdJorge, @bidoubiwa, @curquiza, and @tpayet! 🎉