Query rule : promoted hits with position
Closed this issue · 2 comments
TomKlotzPro commented
Description
After testing this snippet for the maximum value of position on the php playground. I retrieve this specific error :
Expecting an array (in `[0].consequence.promote`) (near 1:113)
or
Invalid `objectID`: bad format (expecting `[A-Za-z0-9_-]+`) (in `[0].objectID`) (near 1:32)
Steps To Reproduce
Use the playground https://github.com/algolia/api-clients-playground/tree/master/php
And try to run this snippet :
https://www.algolia.com/doc/guides/managing-results/rules/merchandising-and-promoting/how-to/promote-hits/#api-1
It works perfectly with the Go Client.
DevinCodes commented
Found the issue: it needs to be an array of arrays. Updating the snippet 👍
DevinCodes commented
Since it's an issue with the snippet in the Algolia docs, and not the client, I'm closing this issue.