basemkhirat/elasticsearch

Unable to fetch more than 10 records?

Opened this issue · 3 comments

I am unable to get more than 10 records on get and search method ? But if i pass size as a parameter in search and get method then i am getting all possible records. So, What is the correct approach to handle size issue in get and search method ?

Please provide a code snippet.

Hi, @basemkhirat

I encounter a similar issue.
I have a model called EsReview

Assume I have 20 elements in the type,
If I use $records = EsReview::all();
I can only get a collection of 10 records.
But if I use $records = EsReview::take(20)->get();
I can get all 20 records.

This issue also happens when I try to select something.
Like $records = EsReview::where("id", ">", 1)->get();
I can only get 10 records.

My env is
"php": ">=7.1.3",
"laravel/lumen-framework": "5.8.*",
"mlntn/lumen-artisan-serve": "~1",

issue resolved, can you please help me with this?