Wednesday 22 April 2015

Using multiple Core results webpart on single page - Sharepoint 2010

Good Afternoon Friends!

Hope you all are doing good :)

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

Consider 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 still no luck. I too encountered this situation and was not getting the answer for it.

What exactly is going wrong here?

While doing some googling, Finally I found the reason for it. Its because of the Core Results Webpart property "Cross-Web Part Query ID". Its the culprit.



I checked the property for all 3 web parts and it was showing as "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 of the 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 this MS blog Change how search results appear in the Search Core Results Web Part (Search Server 2010)


Happy Learning! :)











No comments:

Post a Comment