-
-
Notifications
You must be signed in to change notification settings - Fork 292
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
Scout Driver - Model update or save dont trigger tntsearch index update #303
Comments
Did you do all of the steps in setting up Scout for your model, from the
Laravel docs..?
…On Wed, 25 Oct 2023 at 06:43, Recigio Poffo ***@***.***> wrote:
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",
—
Reply to this email directly, view it on GitHub
<#303>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAQMGWU337A3AUI6AIWZDCLYBCKGHAVCNFSM6AAAAAA6OXE4COVHI2DSMVQWIX3LMV43ASLTON2WKOZRHE3DANJSGQ2DMNY>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
Thanks for the answer. Well, i did, i guess:
Model::search works, but save() do not update index. Did I forget something? |
perhaps your permissions are not correct, if you are running queues it's
possible the queue runner doesn't have access to the index file ? I'm
guessing here :)
…On Thu, Oct 26, 2023 at 1:38 PM Recigio Poffo ***@***.***> wrote:
Thanks for the answer. Well, i did, i guess:
1. Prividers for TNTSearchScoutServiceProvider e ScoutServiceProvider
2. config/scout.php (there is index created in storage)
3. use Searchable and toSearchableArray() in model
Model::search works, but save() do not update index.
Did I forget something?
—
Reply to this email directly, view it on GitHub
<#303 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAQMGWSMFXOHTR5GUWLHOJTYBJDSTAVCNFSM6AAAAAA6OXE4COVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTOOBQHE2DGNRZHE>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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:
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:
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:
The text was updated successfully, but these errors were encountered: