Closed amman20 closed 2 years ago
Hi @amman20 , thank you for reaching out.
You can get the queryID by doing something like this:
$query = Product::search($q)->with(['clickAnalytics' => true]);
$queryID = $query->raw()['queryID'];
The raw
method gives you access to the raw response as an array, and you can get the queryID from there. I hope this helps 🙂
If you feel like the code you described should work as well, feel free to open a PR and we'll happily review it 😄
Cheers!
thank you @DevinCodes for your reply I will try this.
Description
queryID is not reachable because it's neglected when creating ScoutExtendedBuilder.
Steps To Reproduce
When I send a callback to search Method:
$algolia->search($query, $options);
returns an array with queryID added to it . However, when query builder is instantiated queryID value is neglected.I need queryID to be able to implement insights