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
For tests, we would like to use the collection driver, but we're passing custom options for typesense that (reasonably so) the collection driver doesn't support.
What we would sort of like to see is something like Scout::assertWasSearched(Model::class, [...$options]) so we can abstract the service we're using and really just assert that we at least did the search we expected.
I suspect some of the wisdom for this not being supported would say to just use typesense in searches, but I am curious if what I'm asking for is reasonable and possible, and if so, I'd be more than happy to make a PR.
Steps To Reproduce
Create a test that uses Model::search('')->options(['filter_by' => 'created:[0..9999]']) and see that the collection driver has no concept of the filter_by key that typesense uses.
The text was updated successfully, but these errors were encountered:
As Laravel is an open source project, we rely on the community to help us diagnose and fix issues as it is not possible to research and fix every issue reported to us via GitHub.
If possible, please make a pull request fixing the issue you have described, along with corresponding tests. All pull requests are promptly reviewed by the Laravel team.
Scout Version
10.11.8
Scout Driver
Typesense
Laravel Version
10.48.25
PHP Version
8.2.0
Database Driver & Version
No response
SDK Version
No response
Meilisearch CLI Version
No response
Description
For tests, we would like to use the
collection
driver, but we're passing custom options for typesense that (reasonably so) the collection driver doesn't support.What we would sort of like to see is something like
Scout::assertWasSearched(Model::class, [...$options])
so we can abstract the service we're using and really just assert that we at least did the search we expected.I suspect some of the wisdom for this not being supported would say to just use typesense in searches, but I am curious if what I'm asking for is reasonable and possible, and if so, I'd be more than happy to make a PR.
Steps To Reproduce
Create a test that uses
Model::search('')->options(['filter_by' => 'created:[0..9999]'])
and see that the collection driver has no concept of thefilter_by
key that typesense uses.The text was updated successfully, but these errors were encountered: