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

Model update or save dont trigger tntsearch index update #362

Open
recigio opened this issue Oct 25, 2023 · 1 comment
Open

Model update or save dont trigger tntsearch index update #362

recigio opened this issue Oct 25, 2023 · 1 comment

Comments

@recigio
Copy link

recigio commented Oct 25, 2023

I was able to successfully configure laravel-scout with tntsearch to search records. Works great when all records are imported with artisan. But when i try to add records to index, the searchable() method dont work:

$post = Post::find(1);
$post->searchable();

Call to undefined method Illuminate\Database\Eloquent\Builder::searchable()
or
Method Illuminate\Database\Eloquent\Collection::searchable does not exist

And, when update ou save any model, no action are triggered. Like:

$post = Post::find(1);
$post->indexableColum = 'new value';
$post->save();

I dont want to flush and import all records all the time, i want to just update ou save new records when needed.

Any help?

Thanks!

Using:

"teamtnt/laravel-scout-tntsearch-driver": "^13.2",
"laravel/framework": "^9.2",
@msoler75
Copy link

I have the same problem

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

No branches or pull requests

2 participants