basemkhirat/elasticsearch

Undefined variable: data

Closed this issue · 3 comments

when call php artisan es:indices:list from command line

It gives me

ErrorException : Undefined variable: data

at /vendor/basemkhirat/elasticsearch/src/Commands/ListIndicesCommand.php:96
92| $data[] = $row;
93|
94| }
95|
96| return $data;
97|
98| }
99|
100| /**

Make sure you add the necessary info in config/es.php

Just for clarification, I faced the same issue and I realized that I didn't have any index in my elasticsearch, so I created it and configured it in the config/es.php and it worked.

Suggestion: handle this error and provide a useful message.

Maybe close this issue?

Yes @pildit and @ayrtonvwf you were right it was my mistake that I didn't configured the config/es.php file first
Thanks Guys :)