You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe 🙏
We have an array of ObjectIds ( a cart of items ), for which we would like to get recommended/related products for. We can only provide a single object Id to FrequentlyBoughtTogetherOptions/RelatedProductsOptions, which means we need to generate an array of these. The result is that we get multiple arrays of items, which have no context of each other:
You can provide a list of object id's, it fetches the arrays, and based off the index positions in each array and the number of object occurrences, it weighs, sorts, and filters the objects then returns them into a single array.
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe 🙏
We have an array of ObjectIds ( a cart of items ), for which we would like to get recommended/related products for. We can only provide a single object Id to
FrequentlyBoughtTogetherOptions
/RelatedProductsOptions
, which means we need to generate an array of these. The result is that we get multiple arrays of items, which have no context of each other:Describe the solution you'd like 🤔
Looking in your javascript library, we noticed this solution has already been implemented:
https://github.com/algolia/recommend/blob/cfaf111b592e102f851f2216336a2fe566b2b6c2/packages/recommend-core/src/getRecommendations.ts#L4
https://github.com/algolia/recommend/blob/next/packages/recommend-core/src/utils/mapToRecommendations.ts
https://github.com/algolia/recommend/blob/cfaf111b592e102f851f2216336a2fe566b2b6c2/packages/recommend-core/src/utils/computeAverageIndices.ts#L4
You can provide a list of object id's, it fetches the arrays, and based off the index positions in each array and the number of object occurrences, it weighs, sorts, and filters the objects then returns them into a single array.
The text was updated successfully, but these errors were encountered: