Paging doesn’t work on search page with custom ISecurityTrimmerPost

Symptoms

After implementing custom Post-Security Trimmer using ISecurityTrimmerPost interface, paging doesn’t work as expected on SharePoint search result WebPart. It doesn’t show items as per page limit. For example, suppose the page limit is 10 and search returns 30 items as per search criteria. If custom security trimmer post trims out all 10 items from first page, 5 items from the second page, and 5 items from the last page, search result WebPart renders first page empty, second page with 5 items, and 5 items on the last page--instead of rendering all 10 items on a single page.

Cause

This issue occurs by design, associated with the ISecurityTrimmerPost. This issue is a performance trade off, not having the framework of looping thorough and fetching additional results which are trimmed due to security trimmer post.

Resolution

The work around is to write a custom WebPart which can execute a search query in a (predefined) loop to get records with larger offset (page limit) and build custom paging for rendering.
Egenskaper

Artikel-id: 3047723 – senaste granskning 11 mars 2015 – revision: 1

Feedback