Closed chrisgrim closed 3 years ago
Hey @chrisgrim, I think this bug is created in a wrong repository, isn't it?
Anyways, I believe this is a Scout bug, because elastic-scout-driver doesn't change shouldBeSearchable
logic, it comes with Laravel Scout. I'll try to reproduce the issue and see what can be done here.
Please, reopen the bug in the related repository, I'm closing it here as unrelated.
Good call! I just opened the same bug in the scout git. Thanks!
Describe the bug unsearchable() does not remove model from index
To Reproduce In my event when an event is published I change the status to 'p', In my event model I have
This works great but now I am running into an issue. After an event has been published if I go back to the event and decide I want to embargo it (publish it at a certain time in the future) I update the event status to 'e' and add an embargo date. I just discovered however that after updating the event it still remains in my index and searchable. I went and looked at the laravel scout documentation and they have unsearchable(). So now I tried
However this still doesn't remove the event from the index.
Current behavior Event is remaining in index even with $event->unsearchable();
Expected behavior I expected the event to drop from the index when the status changed away from 'p'