How to skip database queries when calling `search` on laravel model with meili and laravel scout

85 Views Asked by At

I have a transaction model, and other related models. While indexing in meili I eager load relations in transaction model and add a new key and relation, so in meili it shows a key and JSON data.

I thought calling ::search on model will fetch data from meili and return, but scout seems to fetch just model id and calling database with IN operator to fetch models.

For complex models I don't want to hit database and just fetch whole object from meili. How is this possible? I couldn't find it in scout documentation.

0

There are 0 best solutions below