Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Show popup to select field to index. #248

Open
Grassper opened this issue Aug 26, 2021 · 6 comments
Open

Show popup to select field to index. #248

Grassper opened this issue Aug 26, 2021 · 6 comments
Labels
enhancement New feature or request

Comments

@Grassper
Copy link

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.

@PixeledCode
Copy link

That's something you can do when using Meilisearch client on your frontend.

@bidoubiwa bidoubiwa added the enhancement New feature or request label Aug 26, 2021
@bidoubiwa
Copy link
Contributor

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.

@bidoubiwa
Copy link
Contributor

related: #211

@bidoubiwa bidoubiwa added after-strapi-v4 Issues to do after strapi v4 integration hacktoberfest labels Sep 28, 2021
@dadaphl
Copy link

dadaphl commented Oct 22, 2021

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

@Grassper
Copy link
Author

@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.

@bidoubiwa
Copy link
Contributor

bidoubiwa commented Oct 26, 2021

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!

@bidoubiwa bidoubiwa added enhancement New feature or request and removed enhancement New feature or request after-strapi-v4 Issues to do after strapi v4 integration labels Apr 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

5 participants