-
Notifications
You must be signed in to change notification settings - Fork 331
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix Typesense pagination issue when using query callback (#867)
* fix(typesense): fix per_page error when paginating with query callbacks - Implement performPaginatedSearch for large result sets - Add maxTotalResults property to limit total fetched results - Adjust search method to use maxPerPage as default limit - Ensure search respects both maxPerPage and maxTotalResults limits This ensures that when the `getTotalCount` builder function is called with a query callback, the resulting request to the server will be broken down batches of 250 results per page, Typesense's maximum. * feat(typesense): addmax total results configuration for typesense - Introduce a new 'max_total_results' configuration option for Typesense in scout.php. - Update TypesenseEngine constructor and EngineManager to utilize this new parameter, providing better control over the maximum number of searchable results. This ensures that the resulting requests to the server when broken up to batches are handled by the user, not defaulting to Typesense's total records, as that can introduce perfomance issues for larger datasets. * test(typesense): add test for paginated search with empty query callback - Implement new test method in TypesenseSearchableTest to verify pagination behavior with an empty query callback. This ensures the search functionality works correctly when no additional query constraints are applied. * style: ci linting errors * fix(test): fix missing constructor args in typesense unit test * style: more ci linting errors * formatting * formatting --------- Co-authored-by: Taylor Otwell <[email protected]>
- Loading branch information
1 parent
8790681
commit 5fae355
Showing
6 changed files
with
88 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters