spatie/searchindex

ErrorException in Client.php line 68:

bichinl opened this issue · 1 comments

I've been following step by step the implementation of your package, but for some reason when I simply call SearchIndex::getResults('look for this'); in my routes.php , I've got this error:

ErrorException in Client.php line 68:
ErrorException in Client.php line 68:
Argument 1 passed to Elasticsearch\Client::__construct() must be an instance of Elasticsearch\Transport, array given, called in .../vendor/spatie/searchindex/src/SearchIndexServiceProvider.php on line 47 and defined

ElasticSearch is running and the DB is up and running, I've implemented the necessary methods in my model file.

What could be wrong?

When using elasticsearch you should specify ^1.3 as the version constraint on the elasticsearch/elasticsearch. If made this a bit more clear in the composer.json file.