You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
I am updating some data of a model, i also have a observer which specifies the status based on a few criteria. Because i dont want to create a loop, i use the saveQuietly method. The data gets saved in the database, but not in Elasticsearch (ok i get it, because i disabled all events i guess). But i want to use a method like ->searchable() or something to index my new data to Elasticsearch.
Is there a way to force the data to be send again to Elasticsearch? I cannot use the ->touch() method, because this will create a loop because the updated observer is getting fired again.
Expected behavior
I would expect that the method ->searchable() would reindex the data again. But it look liks it doenst do anything.
The text was updated successfully, but these errors were encountered:
Hey @martijnderidder, I don't see why the searchable method would not work. I've just tried the code below and it seems to be working fine:
$source = factory(Book::class)->make();
$source->saveQuietly();
$source->searchable();
$found = Book::search()->get(); // returns the created object
Please ensure that the queue workers are running if you use queues and that your code looks similar to the above.
If you still don't see changes in Elasticsearch, make sure that the mapping for the fields you index is configured properly and try to debug the code step by step to see if this method is being called.
Describe the bug
I am updating some data of a model, i also have a observer which specifies the status based on a few criteria. Because i dont want to create a loop, i use the
saveQuietly
method. The data gets saved in the database, but not in Elasticsearch (ok i get it, because i disabled all events i guess). But i want to use a method like->searchable()
or something to index my new data to Elasticsearch.Is there a way to force the data to be send again to Elasticsearch? I cannot use the
->touch()
method, because this will create a loop because theupdated
observer is getting fired again.Expected behavior
I would expect that the method
->searchable()
would reindex the data again. But it look liks it doenst do anything.The text was updated successfully, but these errors were encountered: