getFrequentlyBoughtTogether with more objectIDs

Hi,

Is there a way to get frequently bought together items for more than 1 objectID?

This is working;

client.getFrequentlyBoughtTogether([
{
indexName: ‘your_index_name’,
objectID: ‘your_object_id’,
},
])

But this isn’t working;

client.getFrequentlyBoughtTogether([
{
indexName: ‘your_index_name’,
objectIDs: [‘your_object_id1’, ‘your_object_id2’, ‘your_object_id2’],
},
])

Kind regards,
Jeroen

Hi @zinc,

This should work. Per the documentation, if you specify multiple objectIDs you will get a single set of the aggregated results from the requests, ordered by their score.

What are you seeing when you use the second code snippet?