Torann / laravel-cloudsearch

Index and search Laravel models on Amazon's CloudSearch
BSD 2-Clause "Simplified" License
22 stars 10 forks source link

Console command search:index not working #2

Open eggnaube opened 7 years ago

eggnaube commented 7 years ago

When i execute artisan search:index i get the following error:

[Symfony\Component\Debug\Exception\FatalThrowableError] Type error: Argument 1 passed to LaravelCloudSearch\Console\IndexCommand::index() must be an instance of Illuminate\Database\Eloquent\Builder, instance of A pp\Models\Vintage given, called in /home/vagrant/sites/vinamicus-server/vendor/torann/laravel-cloudsearch/src/Console/AbstractCommand.php on line 76

Torann commented 7 years ago

The command is search:index <model>. The readme was not updated (is now though)

mizansyed commented 7 years ago

Hi Daniel

Thanks for updating the Readme.

I am now getting the above error after following the new instruction.

Thanks for your help.

Torann commented 7 years ago

Hmmm.. looks like I might have the wrong arguments in there. Which is weird

Torann commented 7 years ago

Ok. Let me know how that works out for you. I just update the arguments used in the index and flush commands. New version released v0.1.4

mizansyed commented 7 years ago

Thanks for the quick reply but now I get

[ErrorException] Missing argument 2 for LaravelCloudSearch\Console\IndexCommand::index(), called in /path-removed/vendor/torann/laravel-cloudsearch/src/Conso le/AbstractCommand.php on line 76 and defined

Torann commented 7 years ago

Ah! this was missed in the command because all of my CloudSearch items were localized, which calls the method differently and that seems to be the one I focused on updating. Fixing it now. Give the new version a try. Releasing it in 10