Skip to content

Commit a43e242

Browse files
committed
Clarify that fulltexxt gambits are required for adding new searchers.
1 parent 751c7a3 commit a43e242

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docs/extend/search.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -192,8 +192,8 @@ For an example, see core's [UserSearcher](https://github.com/flarum/core/blob/ma
192192

193193
Then, you'll need to use that searcher in your model's `List` controller. For an example, see core's [ListUsersController](https://github.com/flarum/core/blob/master/src/Api/Controller/ListUsersController.php#L93-L98).
194194

195-
You'll also probably want to create a full text gambit for your model, so that you can actually search it.
196-
See core's [FulltextGambit for users](https://github.com/flarum/core/blob/master/src/User/Search/Gambit/FulltextGambit.php) as an example.
195+
Every searcher **must** have a fulltext gambit (the logic that actually does the searching). Otherwise, it won't be booted by Flarum, and you'll get an error.
196+
See core's [FulltextGambit for users](https://github.com/flarum/core/blob/master/src/User/Search/Gambit/FulltextGambit.php) for an example.
197197
You can set (or override) the full text gambit for a searcher via the `SimpleFlarumSearch` extender's `setFullTextGambit()` method.
198198

199199
### Search Drivers

0 commit comments

Comments
 (0)