File tree Expand file tree Collapse file tree 1 file changed +12
-4
lines changed Expand file tree Collapse file tree 1 file changed +12
-4
lines changed Original file line number Diff line number Diff line change @@ -273,13 +273,21 @@ protected $hidden = [
273
273
274
274
``` php
275
275
// plainto_tsquery()
276
- $results = App\Post::search('cat rat')->usingPlainQuery()->get()
276
+ $posts = App\Post::search('cat rat')
277
+ ->usingPlainQuery()->get()
277
278
278
- // plainto_tsquery()
279
- $results = App\Post::search('cat rat')->usingPhraseQuery()->get()
279
+ // phraseto_tsquery()
280
+ $posts = App\Post::search('cat rat')
281
+ ->usingPhraseQuery()->get()
280
282
281
283
// to_tsquery()
282
- $results = App\Post::search('fat & (cat | rat)')->usingTsQuery()->get()
284
+ $posts = App\Post::search('fat & (cat | rat)')
285
+ ->usingTsQuery()->get()
286
+
287
+ // websearch_to_tsquery()
288
+ // uses web search syntax
289
+ $posts = App\Post::search('"sad cat" or "fat rat" -mouse')
290
+ ->usingWebSearchQuery()->get()
283
291
284
292
// DIY using a callback
285
293
use ScoutEngines\Postgres\TsQuery\ToTsQuery;
You can’t perform that action at this time.
0 commit comments