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
When you implement the Michaeljennings\Laralastica\Searchable trait it adds a bootSearchable method which registers a model observer, if you comment that out it will stop it syncing every time.
Then you can manually fire the Michaeljennings\Laralastica\Events\IndexesWhenSaved event whenever you want to index your model.
Alternatively, if you only want to index a model when certain criteria have been met you could extend the Michaeljennings\Laralastica\Observer class and override the bootSearchable method to use your new observer. Then you could perform the relevant logic checks in the observer.
In some cases, we might save a model but not wish to sync it to ES.
For example, if we are updating an attribute that is not indexed, this creates an unnecessary overhead.
Is there a preferred method to achieve this?
The text was updated successfully, but these errors were encountered: