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

[Feature] Use SearchableScope instead PageScope #264

Open
olennikoff opened this issue Nov 24, 2023 · 4 comments
Open

[Feature] Use SearchableScope instead PageScope #264

olennikoff opened this issue Nov 24, 2023 · 4 comments
Labels
enhancement New feature or request

Comments

@olennikoff
Copy link

olennikoff commented Nov 24, 2023

Offset search is very slow in the import, need use chunkById
More info for comparsion https://www.laravel-enlightn.com/blog/laravel-offset-vs-cursor-pagination/

@olennikoff olennikoff added the enhancement New feature or request label Nov 24, 2023
@matchish
Copy link
Owner

matchish commented Nov 24, 2023

Good idea. How would SearchableScope looks like?

@olennikoff
Copy link
Author

It integrated into Scout /vendor/laravel/scout/src/SearchableScope.php

@matchish
Copy link
Owner

Could you share the solution?

@yocmen
Copy link
Contributor

yocmen commented Feb 7, 2024

@matchish @olennikoff on my fork https://github.com/yocmen/laravel-scout-elasticsearch/tree/add-pagination-mode i have something for this, it improves a lot the way to import

yocmen@51b9edc

It uses the Cache Facade.

Note: I'm still looking for ways to improve it in large tables (3M+) + relationships eager loaded, any idea is welcomed and I can add a PR for this if needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants