Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

Burano's avatar

Laravel Scout + Meilisearch not indexing all records?

I have a database of products, that use the SKU as the primary key and I want to be able to search it. I have Meilisearch installed via homebrew, and I have installed the scout drivers etc...

The functionality of the search itself works, and it was indexing properly up until yesterday, so I know scout/meilisearch is working. However, I cannot for the life of me figure out why Meilisearch decided to start refusing to index all records. I have 15,000 records in 1 table that I want to index. When I run artisan scout:import "App\Models\Product", it beings processing them, but only shows about 10 in the console. Then I check the Meilisearch index dashboard, and it's only imported 1,500 indexes?

I try searching my page, and some products show up, but a majority of them just don't show in the search because they are not indexed.

Can someone please explain to me why this is happening? It was working exactly like I wanted it to and now for completely nonsensical reasons it basically just decided to stop working and there is basically 0 information about any sort of issue like this that I can find on the internet.

1 like
3 replies
andygo's avatar

@burano did you find a solution to this? I am having a similar problem when using php artisan scout:import it misses some records that are in the database table. Most of the db records are imported, but it drops random records.

1 like
klipitkas's avatar

I am experiencing the same issue using scout for a test example project. For no apparent reason it seems to not index all models (around 300K entries in DB). It does not work in both sync / queue mode.

2 likes
OK200Paul's avatar

Hi everyone! A little late to the party but I've been having this same issue today. I found that if I update the "chunk" option on the import command, Meilisearch can better handle the incoming payload and doesn't bork.

For example..

php artisan scout:import "App\User" -c 10

The chunk level is configurable, try php artisan scout:import --help and you'll see the available options.

When I lowered my chunk level, Meilisearch imported the data in a much more predictable way. We're using a small server, so the memory isn't great on it. Hope this helps!!

Please or to participate in this conversation.