algolia / scout-extended

Scout Extended: The Full Power of Algolia in Laravel
https://www.algolia.com/doc/framework-integration/laravel/getting-started/introduction-to-scout-extended/
MIT License
400 stars 86 forks source link

Get correct `total` value when a callback is defined #332

Open tobz-nz opened 1 year ago

tobz-nz commented 1 year ago
Q A
Bug fix? yes
New feature? no
BC breaks? no / maybe?
Related Issue n/a
Need Doc update no

Describe your change

This PR overwrites that to always return the correct result count from the engine's results.

What problem is this fixing?

The base Scout Builder class skips the engine's total hits value when a callback method is defined in the search() method.