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

plazari96's avatar

[Answered]TNTSearch Driver - Laravel Scout

Hello Guys!

I'm using for the first time Laravel Scout. And I'm creating an application with Autoscalling, my client don't have any way to invest in algolia search, and I didn't find any way to use Laravel Scout with Cloudsearch AWS.

I saw in Laravel news, an tutorial to use Laravel Scout with TNT Search (https://laravel-news.com/2016/10/tntsearch-with-laravel-scout/) but my doubt is about upload the file generated by TNTSearch to Amazon S3 and download in every server created.

Or If have an driver to Amazon CloudSearch.

Anybody can help me?

0 likes
7 replies
plazari96's avatar

@willvincent But TNT Search don't generate a file for Laravel Scout and this file don't need to be saed in the storage folder?

willvincent's avatar
Level 54

So use an s3 bucket for storage... I don't see the issue here..

plazari96's avatar

@willvincent I thought this would be a problem that Laravel saçvar not accept the file in an S3 Bucket.

Thank You!

willvincent's avatar

@plazari96 Looking at it a little more, amazon EFS is probably a better option than s3. There's actually a related issue in the issue queue for the underlying package the scout driver uses: https://github.com/teamtnt/tntsearch/issues/34

s3 won't work.. but amazon efs should. Create an efs instance, and mount it on all your web instances, point to that as your storage location for the index file.

plazari96's avatar

I thought about doing something he synced the file with the S3 each, for example 30 minutes, or when you suffer a change.

However searching about, I would not give too sure. Anyway, at first, believe my client is leaving for a more fixed structure in Digital Ocean, according to what he told me, he wants a 3 web servers with load balancer, one for database and s3 for images.

So I think it can work, if I choose a server to be responsible for storing this file on your storage.

Did we would have a problem with that?

willvincent's avatar

You could either put the file on an nfs share that's mounted on each web server.. or maybe do all of the indexing on one of the three servers and then rsync the file across to the others. The nfs mounted storage would be best though -- in the event any other files/etc need to be shared between the servers.

But, because it's a sqlite DB, it needs to appear as a local file, so it can't be remote to the system running the search, unless it's on an NFS (or similar) share that is mounted as a local directory.

Please or to participate in this conversation.