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
393 stars 85 forks source link

Add `lazyMap` method to Algolia engine #307

Closed bakerkretzmar closed 2 years ago

bakerkretzmar commented 2 years ago
Q A
Bug fix? yes
New feature? yes
BC breaks? no
Related Issue Fix #298
Need Doc update no

Describe your change

Adds a lazyMap method to the Algolia engine to fix #298. This PR is a band-aid solution—it doesn't actually implement any 'lazy' functionality the way Scout does, lazyMap behaves exactly the same as map and just returns a lazy collection, but at least now lazyMap will work instead of returning no results.

What problem is this fixing?

See #298. lazyMap is not currently implemented, and because Scout Extended uses different result keys than Scout does, calling lazyMap when using Scout Extended always returns no results.

cc @DevinCodes

DevinCodes commented 2 years ago

Hi again @bakerkretzmar !

We've just released v2.0.3, which include this fix as well as the contribution you made in #308 . Thank you for contributing 💙

bakerkretzmar commented 2 years ago

Awesome, thank you!