-
Notifications
You must be signed in to change notification settings - Fork 19
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
Algolia not indexing relation field, only shows count #139
Comments
+1, nesting entity relational data into the algolia record payload would be very useful |
Yes relations were populated before but it seems that it is no longer the case. It is pretty annoying... @MattieBelt any idea why this changed ? |
Hi, spotted the same issue here. Happening with array relationships, like for example, an array of categories belonging to the same post. |
also noticed the same |
parsagholipour
added a commit
to parsagholipour/mattie-strapi-bundle
that referenced
this issue
Jan 21, 2023
It will allow to populate relations before sending it to provider Example usage: ``` contentTypes: [ { name: 'api::post.post', populate: ['tags'] } ], ``` MattieBelt#139
Open
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I installed the Algolia x Strapi plugin today, everything went really smoothly except for one field. Here's my setup:
On Strapi, I have 2 collection types:
They have a relationship, so a category can belong to many guides.
When I publish a guide, Algolia seems to only index the count:
My plugins.js search object:
search: { enabled: true, config: { provider: 'algolia', providerOptions: { apiKey: env('ALGOLIA_PROVIDER_ADMIN_API_KEY'), applicationId: env('ALGOLIA_PROVIDER_APPLICATION_ID'), }, contentTypes: [{ name: 'api::guide.guide' }], }, },
I've only ever used GraphQL to query Strapi, so I'm not familiar how to specify the content types (eg. api::guide.guide), only that it seems to match the URL in Strapi when viewing a collection type. Is this something to do with the Entity Service API? Does something need to be changed to make it work with relations?
EDIT: I've since learned that in order to make the REST API include relations you need to include a 'populate' parameter, is there something equivalent that can be entered into the contentTypes array in plugins.js?
The text was updated successfully, but these errors were encountered: