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

Pagination not working (too many results and random number of items on page..) ? #349

Open
magicyoda opened this issue Dec 3, 2024 · 0 comments

Comments

@magicyoda
Copy link

Hello,

I'm really in trouble to make Algolia search using Laravel Scout driver and get proper pagination.

Here my search:

$results = Post::search($searchQuery)
            ->with(['filters' => $filters])
            ->paginate(15);

First of all: the amount of results is more than thousands, even if in Algolia, I set the maximum to 100:

image

Then, on the first page, I usually get the requested 15 items, but then on subsequent pages, I get sometimes 10, sometimes 5 and at the end of all available pages, I get 0 (white page of results).

Can anybody explain me what I'm doing wrong ?

Thank you

"name": "algolia/scout-extended",
"version": "v3.1.1",
"name": "laravel/scout",
"version": "v10.11.5",
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

No branches or pull requests

1 participant