Skip to content

Releases: meilisearch/strapi-plugin-meilisearch

v0.6.5 🚀

25 May 13:40
fc77153

Choose a tag to compare

🚀 Enhancements

Thanks again to @bidoubiwa and @nicolasvienot! 🎉

v0.6.4 🚀

18 May 08:15
cade9df

Choose a tag to compare

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 🚀

03 May 13:15
b86bd99

Choose a tag to compare

🚀 Enhancements

  • Change transformEntry function in plugin.js to async function (#387) @dzcpy
  • Make filterEntry async compatible in filterEntries function in config.js (#395) @nicolasvienot

🐛 Bug Fixes

Thanks again to @bidoubiwa, @dzcpy and @nicolasvienot! 🎉

v0.6.2 🚀

15 Mar 20:09
6fe6f2f

Choose a tag to compare

🔥 Strapi V4 compatibility !! 🔥

⚠️ Breaking changes

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

Thanks again to @bidoubiwa! 🎉

v0.5.1 🚀

15 Mar 15:48
48afd5e

Choose a tag to compare

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 🚀

13 Jan 17:40
0af3891

Choose a tag to compare

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 🚀

06 Dec 11:25
6f5c842

Choose a tag to compare

🚀 Enhancements

  • update index settings when updating a collection (#328) @haye-webbio

See documentation in readme

Thanks again to @haye-webbio 🎉

v0.4.0 🚀

29 Nov 17:42
b7374fd

Choose a tag to compare

This package version is compatible with MeiliSearch v0.24.0 🎉

⚠️ Breaking changes

⚠️ Please remove and re-index your collections in MeiliSearch if you want to avoid duplications ⚠️

🚀 Enhancements

🐛 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

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.

Screenshot 2021-11-29 at 15 57 21

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

⚠️ Avoid playing around with the 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

credentials

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 🚀

15 Jul 16:28
13a44e2

Choose a tag to compare

Changes

Thanks again to @bidoubiwa and @mdubus! 🎉

v0.3.2 🚀

05 Jul 15:49
8bebc73

Choose a tag to compare

Changes

Thanks again to @bidoubiwa, @curquiza, and @sargreal! 🎉