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
Conditional indexing only applies when using the save method on a model, the query builder or relationships directly. This is because the behavior on models and collections directly is meant to "force" them to be applied and ignores the `shouldBeSearchable` method.
Copy file name to clipboardExpand all lines: scout.md
+11Lines changed: 11 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -262,6 +262,17 @@ Sometimes you may need to only make a model searchable under certain conditions.
262
262
return $this->isPublished();
263
263
}
264
264
265
+
Note that this is only applied when manipulating models through the `save` method, queries or relationships. Directly making models and collections searchable would still override this behavior.
0 commit comments