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
Matchish\ScoutElasticSearch\ElasticSearch\EloquentHitsIteratorAggregate::__construct(): Argument #1 ($results) must be of type array, Elastic\Elasticsearch\Response\Elasticsearch given
To Reproduce
I think bug description is clear enough about how to reproduce
Expected behavior
In both cases it should return a collection with appropriate models
Additional context
Is it possible that I am trying to do this the wrong way?
Version
Versions of Laravel, Scout, and the package.
Hey) feel free to open the pr. But it breaking changes so probably I'll wait until will be merged to master. For now could be solved by calling toArray in callback I think
@matchish yes, calling asArray in the callback does indeed seem to work as well. But I reckon that it's better that the underlying function returns same thing, regardless of if callback argument was used or not :)
Describe the bug
Search breaks when you use callback.
Example: when you I use like this:
Everything is ok. But when you use search with additional callback, like so:
I get the following error:
Matchish\ScoutElasticSearch\ElasticSearch\EloquentHitsIteratorAggregate::__construct(): Argument #1 ($results) must be of type array, Elastic\Elasticsearch\Response\Elasticsearch given
To Reproduce
I think bug description is clear enough about how to reproduce
Expected behavior
In both cases it should return a collection with appropriate models
Additional context
Is it possible that I am trying to do this the wrong way?
Version
Versions of Laravel, Scout, and the package.
"matchish/laravel-scout-elasticsearch": "^6.0.2",
Laravel Framework 10.2.0
The text was updated successfully, but these errors were encountered: