SharePoint search webparts leverage an internal private class called SearchResultsHiddenObject which does a lot of heavy lifting around query execution. This object is also responsible for ‘connecting’ results between webparts such as the Paging, Core Results and Search Actions webparts. Now what if you want to do a custom keyword query or perhaps even a full text query?

The typical answer is to write a custom core results webpart, but what about the other related webparts? You could in theory write a new paging webpart and a new search actions webpart and so on but wouldn’t it be nice if all these related webparts just worked with your new core results webpart? The answer is that they can but you have to get a little creative about modifying the SearchResultsHiddenObject. Here is an example where we disable duplicate trimming for correct paging behavior-

Here is a great walkthrough by Corey Roth on this topic:

Tagged with:

One Response to Search Results Hidden Object

  1. Ashar says:

    Hi Pranav,
    Are you using above code in SP2010? I am not getting “OSSSRHDC_0” property under Items collection and resulting this null srho.

Leave a Reply

Your email address will not be published.

Set your Twitter account name in your settings to use the TwitterBar Section.