Skip to content
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

only 1000 results coming back in search #750

Open
bfis108137 opened this issue Feb 8, 2022 · 3 comments
Open

only 1000 results coming back in search #750

bfis108137 opened this issue Feb 8, 2022 · 3 comments

Comments

@bfis108137
Copy link

We only get 1000 results back in search. I am assuming this is by design but this is very limiting. I get that we will never reach the 1000 but we can't actually know how many there even are. For all we know there could b a million or there could just be 1000

@woyuen
Copy link
Member

woyuen commented Feb 10, 2022

Hi, you cannot retrieve all the results at once and you should use pagination to get them page by page.
This is to counter performance issues, especially with big numbers.

@bfis108137
Copy link
Author

bfis108137 commented Feb 10, 2022

I don't want all of them at once and we are using pagination. However, we cannot get more than 1000 results. That is to say there is no page page 11 when there are 100 per page. We also would like to know the amount of results even if we are not viewing them.

@woyuen
Copy link
Member

woyuen commented Feb 21, 2022

Ok I see what you mean.
Unfortunately you cannot see the total number of pages, or more precisely it can be a temporary number if there are more than 1000 assets.

That's because the search performs internally two steps: one for relevancy and one for availability.
And to prevent performance issues, assets are considered per batch of 1000.

So you have to look at the response value of the boolean exhaustiveNbResults.
If it's false, you can increment the page from the request even if its value is higher than the temporary nbPages.
If it's true, the total number of results is the real number.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants