Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[9.x] Add support for cursor and LazyCollection on scout. #439

Merged
merged 1 commit into from
Jan 4, 2021

Conversation

crynobone
Copy link
Member

@crynobone crynobone commented Dec 30, 2020

At the moment Laravel Scout doesn't utilised cursor or LazyCollection which could be useful when searching large set of data. This PR bring the ability to use get() or cursor() from Eloquent query builder whenever possible.

  • Add Laravel\Scout\Searchable::queryScoutModelsByIds() to return Illuminate\Database\Query\Builder.
  • Add Laravel\Scout\Builder::cursor() to return results as LazyCollection
  • Add Laravel\Scout\Engines\Engine::lazyMap() to map to LazyCollection

Signed-off-by: Mior Muhammad Zaki crynobone@gmail.com

Signed-off-by: Mior Muhammad Zaki <crynobone@gmail.com>
@crynobone crynobone marked this pull request as ready for review January 4, 2021 07:47
@taylorotwell taylorotwell merged commit a9d4f4b into laravel:master Jan 4, 2021
@crynobone crynobone deleted the support-cursor branch January 5, 2021 01:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants