basemkhirat / elasticsearch

The missing elasticsearch ORM for Laravel, Lumen and Native php applications
MIT License
401 stars 130 forks source link

undefined index SERVER_PROTOCOL when using ES in cron job. #105

Closed gokigoks closed 4 years ago

gokigoks commented 5 years ago

This happens only when using paginate. Whats the work around for this?

basemkhirat commented 4 years ago

Fixed Now. Please update.

LengthAwarePaginator requires HTTP request params like $_SERVER which is undefined in PHP console environment.

if we are working on a scripting code, the best practice is to use scan and scroll queries. It's too faster than paginate.