-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
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
Search API - Pagination #235
Comments
Not sure if that is possible without issuing a count query first and then the data query. Seems like it would be slow, though it could be done. Why not simply iterate over what is returned until you hit the end? e.g. always grab chunks of 100 rows at a time, when you hit one where n is < 100 then you know you are done. That saves doing the additional count query and in most cases you will never get past the first result in the UI. |
@goodb @balhoff any update on this. I think they want to see the matched count @vanaukenk @thomaspd we once had a conversation about displaying the matched models after a search. in ART. I can do a separate count call. but i don't know if it the api is available |
@tmushayahama we should separate pagination requirements from count requirements. Which do the users need? I believe you can achieve pagination given the existing API as I described above. If you need a specific result count, we will need to adapt the API. |
@goodb I think for now just the count for display purposes. |
From #230 spec.
For pagination and faster queries,, the purpose of n is for bounds it should be the total matching (independent of limit value) so that pagination can happen. i.e to calculate offset/page pages = n/limit .
limit = pagesize
pages = total matching (n) / limit
offset = page *limit
The text was updated successfully, but these errors were encountered: