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

thebigk's avatar
Level 13

Need Elasticsearch - Scout Integration Tutorial

Algolia is cool, but it breaks my bank. I'm converting an existing forum with several large number of users and posts. Would really appreciate if @JeffreyWay , wouldn't it be nice if you could do a tutorial on integrating Elasticsearch with Scout? I think a lot of Laravel users would want to see this because, Algolia ain't for no-rich people. :-/

0 likes
2 replies
Corben's avatar

Integrating Elasticsearch as a Scout driver seems not very difficult. Just pull in the driver from ErickTamayo:

composer require tamayo/laravel-scout-elastic

After that, add the correspsonding entries to the config/app.php and config/scout.php file, like mentioned on the package's homepage. From now on you could use the Laravel Scout API as @JeffreyWay does in the tutorial videos.

Nevertheless, getting something to work like the Algolia instant search stuff running with Elasticsearch is more sophisticated. So far I couldn't find any package which provides as a similar functionality as the vue-instantsearch (I also think its name should reflect it's using Algolia only).

I was able to create a Vue component that is triggering my search backend on my Laravel app on every @keyup event, but I'm missing the cool stuff like refinement lists and proper highlighting of the query within the results (when searching for more than one word at once).

Here I would appreciate a tutorial.

thebigk's avatar
Level 13

Thank you, @Corben . I'm learning elasticsearch DSL so that I can get Algolia like performance. From my readings so far, it looks like Elasticsearch can produce fantastic results like Algolia if you know how to tune it.

My only issue with Algolia is its pricing. For my setup, I'll have to pay north of $300/mo; which I'm not ready to.

I'm curious to know why was Elasticsearch removed from supported drivers in Laravel.

Please or to participate in this conversation.