Using Multiple Core Results Webpart on Single Page - SharePoint 2010

We are going to discuss briefly about one situation where we might be required to use Multiple Core Results web part on a page.

For example, 3 web parts on a single page are configured to use separate search scopes and is expected to show different results as per those search scopes. But you notice that after applying all the correct configurations to the webparts, still webparts (which are above in order) are showing the results of the webpart which is the bottom most.

You go back and check all the search scopes again and again in webparts, but you still won't find. I too encountered this situation and was not getting the answer for it.

What exactly is going wrong here?

While googling, I found the reason for it. The reason id Core Results Webpart property "Cross-Web Part Query ID". 

result query option

I checked the property for all 3 web parts and it was showing "Query 2" for all. When I changed this property for other 2 web parts (i.e.. 2nd web part = Query 3 & 3rd web part = Query 4) Voila!, It started showing results correctly as per the respective search scopes.

In reality, Cross-Web Part Query ID property connects web parts that displays the same query Id.

If we want to keep the same Cross-Web Part Query ID for all the web parts then only the first Web Part can be edited to change this property. All other Search Core Result Web Parts that share the same ID are affected by the change.

Remember we only have following 4 values present in this property,

  • Query 2
  • Query 3
  • Query 4
  • Query 5

This means you can use maximum 4 core results webparts on a single page (if all of them are using different search scopes).

Some details are available in the MS blog.