We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Currently we still use a hack to calculate the number of search results. This was placed somewhere in 2009 when we had to release.
We need to add a real way to support the pager, especially with our growing databases.
Just calculating the exact number of results is not doable when you have a lot of results and want to stay fast.
Though here is a solution mentioned (in the comments):
http://gurjeet-tech.blogspot.nl/2011/02/pagination-of-results-in-postgres.html
I propose a strategy where we don't know the number of results, but do know if there are more than the ones we fetched.
Proposal:
Select the page we want using limit/offset
limit/offset
Add some extra pages to the limit
limit
Check how many results we got back:
is_complete
In both cases recalculate the number of expected pages.
The pager would then look something like:
[1] [2] [3] ... [more]
Please some feedback.
We could use the exact calculation method if the is_exact_page_count flag is set as an argument to the query (like the page and page length args)
is_exact_page_count
The text was updated successfully, but these errors were encountered:
@mworrell Is this still relevant?
Sorry, something went wrong.
See also #599 and #1025.
No branches or pull requests
Currently we still use a hack to calculate the number of search results. This was placed somewhere in 2009 when we had to release.
We need to add a real way to support the pager, especially with our growing databases.
Just calculating the exact number of results is not doable when you have a lot of results and want to stay fast.
Though here is a solution mentioned (in the comments):
http://gurjeet-tech.blogspot.nl/2011/02/pagination-of-results-in-postgres.html
I propose a strategy where we don't know the number of results, but do know if there are more than the ones we fetched.
Proposal:
Select the page we want using
limit/offset
Add some extra pages to the
limit
Check how many results we got back:
limit
results, unset asis_complete
flagis_complete
flagIn both cases recalculate the number of expected pages.
The pager would then look something like:
[1] [2] [3] ... [more]
Please some feedback.
We could use the exact calculation method if the
is_exact_page_count
flag is set as an argument to the query (like the page and page length args)The text was updated successfully, but these errors were encountered: