plastic
plastic copied to clipboard
Feature request: Set search parameters for a query
We need to set search_type
to dfs_query_then_fetch
but there's no way to add this param because getRaw
method doesn't apply any params.
We're using pagination, so paginate->get->getRaw calls can't be somehow configured without of extending Plastic.
Hi, My answer may come in a bit late, and I'm not even a contributor to this package but I'm still going to give you an answer. The SearchBuilder class uses the Laravel Macroable trait. This means that you can extend the behavior of that class as much as you want. There is an example on the Laravel docs explaining how you can extend the Collection class behavior: https://laravel.com/docs/5.7/collections#extending-collections
You should be able to add your own methods that would allow you to change the type argument in your search query.
Xavier