Issue: Unable to segregate the results for the two search core results web part.
Need for Search core results web part
Firstly, I would like to specify the need of Search core results web part in SharePoint is to display Search results and give us control to update the look and feel for the same.
Generally, the results filtered in the search core results are based on keyword query specified with the query string parameter viz. ‘k’.
In cases where you need the query to be fixed, there is an option to specify ‘Fixed Keyword Query’:
This was all about configuring on search core results with some query.
What do we do when we need another core results web part on the same page but configured with a different search query?
We would proceed and add another search core results web part on the page and configure it with a Fixed Keyword Query.
Referring to http://technet.microsoft.com/en-us/library/gg549987.aspx, I was able to resolve an issue wherein I was unable to segregate the results for the two search core results web part.
The point to note here is that ‘Search Core results’ has a property called “Cross Web Part Query ID” on the basis of which the search results are rendered. Whenever multiple search web parts are configured and we want them to display different query results, then we should make sure to change the “Cross Web Part Query ID” for each web part.
The above property is in form of a drop down and should be different for each search core results web part if we expect different results.
If the ID is the same for multiple web parts, the search core results displays results in both the web parts on the basis of either of the query.
For e.g. Search for keyword ‘test’ in one web part and for ‘nest’ in other web part. The results returned on both the web parts would be on the basis of either ‘test’ or ‘nest’ depending on the preference which I am unaware of.
You guys are open to comment the preference taken by search core results in SharePoint. 🙂
5 responses to “Configuring multiple Search Core results web part on a SharePoint 2010 page (Fixed keyword query)”
Eglantine
August 28th, 2012 at 12:42
Nice post, it helped me save so much time 🙂
Luke T
June 26th, 2013 at 09:05
It’s a nice tutorial, though I would very much like to know how to customise the Query ID box code to add additional IDs.
augrad94
September 17th, 2013 at 18:41
Thanks for the post, saved me a lot of time!
carpet cleaning knoxville
February 6th, 2014 at 07:44
Hello, yeah this piece of writing is actually pleasant
and I have learned lot of things from it about blogging.
thanks.
Dhaval
August 13th, 2014 at 17:42
Hi I want to know how to limit search results from specific site collection because federated results web part on Results.aspx page on the right hand site brings results from other site collections as well.