Skip to content

Releases: meilisearch/strapi-plugin-meilisearch

v0.5.0 🚀

13 Jan 17:40
0af3891
Compare
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
Compare
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
Compare
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
Compare
Choose a tag to compare

Changes

Thanks again to @bidoubiwa and @mdubus! 🎉

v0.3.2 🚀

05 Jul 15:49
8bebc73
Compare
Choose a tag to compare

Changes

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

v0.3.1 🚀

26 May 14:33
fa45e4c
Compare
Choose a tag to compare

Changes

Thanks again to @bidoubiwa! 🎉

v0.3.0 🚀

24 May 10:33
404e381
Compare
Choose a tag to compare

Changes

Breaking changes ⚠️

Thanks again to @bidoubiwa, ! 🎉

v0.2.1 🚀

22 Apr 15:36
7cb0f39
Compare
Choose a tag to compare

Changes

Thanks again to @bidoubiwa, @curquiza,! 🎉

v0.2.0 🚀

13 Apr 13:41
3a36efe
Compare
Choose a tag to compare

Changes

Thanks again to @LtdJorge, @bidoubiwa, @curquiza, and @tpayet! 🎉