This pull request addresses an issue where the paginate function in Laravel Scout with the Typesense engine always returns a number of records limited to the perPage value, rather than reflecting the actual total number of matches from the Typesense server. This behavior was traced back to the limit attribute being set to the perPage value, which restricted the number of records returned. (#824)
Changes Made:
Removed the assignment of the perPage value to the limit attribute in the TypesenseEngine class to allow the pagination to reflect the actual total number of matches.
Rationale:
The current behavior prevents users from receiving all the results they expect based on the actual total number of matches on the Typesense server. By removing the forced assignment of the perPage value to the limit attribute, we allow the pagination to work correctly, returning the correct number of records.
This pull request addresses an issue where the paginate function in Laravel Scout with the Typesense engine always returns a number of records limited to the perPage value, rather than reflecting the actual total number of matches from the Typesense server. This behavior was traced back to the limit attribute being set to the perPage value, which restricted the number of records returned. (#824)
Changes Made:
perPage
value to the limit attribute in theTypesenseEngine
class to allow the pagination to reflect the actual total number of matches.Rationale:
The current behavior prevents users from receiving all the results they expect based on the actual total number of matches on the Typesense server. By removing the forced assignment of the
perPage
value to thelimit
attribute, we allow the pagination to work correctly, returning the correct number of records.