cancel
Showing results for 
Search instead for 
Did you mean: 

Why Pagination Information is not correct?

woong
Champ on-the-rise
Champ on-the-rise

I sent a request that search nodes(api/-default-/public/search/versions/1/search) with pagination params like

skipCount = 1930

maxItems = 10

and I recieved a response like

totalItems = 1938

skipCount = 1930

maxItems = 10

count = 2

why count is not 8?

I think totalItems is wrong.

2 REPLIES 2

afaust
Legendary Innovator
Legendary Innovator

I believe the totalItems count is taken from the raw SOLR search response whereas the count of 2 (and the difference from the expected 😎 can be explained that during post-processing of the 8 results, some had to be filtered out for some reason (e.g. dynamic "deny" permissions that could not be checked during the raw SOLR search). There can also be issues with the eventually consistent search index, e.g. new ACLs (which restrict the access to some nodes) may not yet have been indexed, so that the count from SOLR is slightly off from the actual count, and the post-processing has made sure that even when ACLs are not indexed yet you still only get the results you are allowed to see.

woong
Champ on-the-rise
Champ on-the-rise

Thank you for reply.

I understood.