strapi-plugin-meilisearch
strapi-plugin-meilisearch copied to clipboard
Show popup to select field to index.
Hi, It could be nice to have a pop up to select a particular field in the document to index. Instead of indexing all fields of the document.
That's something you can do when using Meilisearch client on your frontend.
Hey @Grassper! Thanks for your suggestion :) I did indeed think of it when I was creating the plugin. I forgot to make an issue about it so many thanks :)
@PixeledCode what grassper is suggesting I think is when you click on the checkbox to index a Collection in MeiliSearch you are given the choice to chose which field are added.
I will come back to you as soon as we start implementing it and if meanwhile no one contributed by doing so.
Out of curiosity, do you have another plugin suggesting pop-ups? In order to inspire from them on how to implement it.
related: #211
this is also useful since by default user passwords (hashed, but still not good) will automatically be given to maili if a collection is connected to users, which is the case if you implement something like a author system
@dadaphl i ran to this same issue so that i open this request and then i made an workaround by using strapi webhooks to send cleaned up collection to strapi server.
Meanwhile this will be possible by adding a transformer to your collection so that you can change the data before sending it to MeiliSearch.
See #287
example in the restaurant collection.
// api/restaurant/models/restaurant.js
module.exports = {
transformEntryForMeiliSearch(entry) {
const transformedEntry = entry
// remove created by and updated by fields
delete transformedEntry.created_by
delete transformedEntry.updated_by
return transformedEntry
}
}
It will be available next release!