-
Notifications
You must be signed in to change notification settings - Fork 58
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
Override Services #772
Comments
Hey @martin-landhi, I'm not aware of plugin service overriding. Can you show me the docs? |
Hey @bidoubiwa Basically i need to search by geolocation in meilisearch. But meilisearch do not allow right now use geolocation with multiple address per document. For that reason i need to override the services/meilisearch/connector.js that is where the documents are sended to meilisearch in this plugin and add my custom logic there to get populated those extra documents. My idea is add my logic inside "sanitizeEntries" function. Are the a posibility in strapi to add my custom logic there overriding that service in strapi-server.js? That is described here: https://docs.strapi.io/dev-docs/plugins-extension Let me know if you need more information. Thanks |
Hey @martin-landhi could You can also add distinctAttributes in the plugin settings here: My bad if it does not help. In which case I'll give it a deeper look :) |
Hey @bidoubiwa transformEntries could works but i need access to add extra entries to meilisearch from there. How can i do that? Example:
|
@bidoubiwa or any other idea to do this? i could do it touching the project files directly on node_modules but i dont know how to rewrite them withut touch that, if i could not do it with transformEntry |
Hey @martin-landhi, unfortunately, not out of the top of my head :/ Another possibility is for you to fork the project, make the changes and publish it on npm. For example: |
How can i override services of this plugin?
I tried wit "strapi-server.ts" on "extensions/meilisearch/strapi-server.ts"
but seems do not work. I am doing something wrong? it this possible?
The text was updated successfully, but these errors were encountered: