Why Pagination Information is not correct?

cancel
Showing results for 
Search instead for 
Did you mean: 
woong
Active Member

Why Pagination Information is not correct?

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
afaust
Master

Re: Why Pagination Information is not correct?

I believe the totalItems count is taken from the raw SOLR search response whereas the count of 2 (and the difference from the expected 8) 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
Active Member

Re: Why Pagination Information is not correct?

Thank you for reply.

I understood.