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

Scout always returning an empty response but paginateRaw returns data #781

Closed
seunsekoni opened this issue Nov 28, 2023 · 5 comments
Closed

Comments

@seunsekoni
Copy link

seunsekoni commented Nov 28, 2023

Scout Version

10.5.0

Scout Driver

Meilisearch

Laravel Version

10.33.0

PHP Version

8.2.0

Database Driver & Version

No response

SDK Version

1.5

Meilisearch CLI Version

No response

Description

I recently upgraded the Laravel version (v10.33) of my project to use scout's latest package (v10.5). But it seems like what used to work doesn't work anymore.

Typically, when I write
Business::search(query: $query)->get(), I get results (this was before the upgrade). Since my upgrade, something weird happens. It doesn't return any result anymore. I get an empty collection. Sample dd()
Illuminate\Database\Eloquent\Collection { #items: [] #escapeWhenCastingToString: false }
I have also tried downgrading but no luck.

I have checked the indexing and yes, all the data are being indexed on meilisearch.
However, when I use paginateRaw(), it returns data in a paginated result . But this isn't my use case. I need the full result in a collection

Steps To Reproduce

Model::search(query: $query)->get()

@crynobone
Copy link
Member

Hey there, thanks for reporting this issue.

We'll need more info and/or code to debug this further. Can you please create a repository with the command below, commit the code that reproduces the issue as one separate commit on the main/master branch and share the repository here?

Please make sure that you have the latest version of the Laravel installer in order to run this command. Please also make sure you have both Git & the GitHub CLI tool properly set up.

laravel new bug-report --github="--public"

Do not amend and create a separate commit with your custom changes. After you've posted the repository, we'll try to reproduce the issue.

Thanks!

@seunsekoni
Copy link
Author

Hi there,

I have done as requested. Repo url is https://github.com/seunsekoni/bug-report

Thanks for taking the time to look at it 🙏

@crynobone
Copy link
Member

Please provide the Meilisearch CLI version information.

@crynobone
Copy link
Member

Also, there are no database migration and seeding for the example Business class, this is not a complete reproducing repository: seunsekoni/bug-report@f37854d

@crynobone
Copy link
Member

Sorry but I'm unable to replicate the issue, please submit an issue with reproducing code that represents the issue for us to debug this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants