Saturday, January 14, 2012

Workaround: Refinement panel stops working when setting Fixed Keyword Query

Recently when working with SharePoint 2010 Search results customization, I experienced weird behavior “Refinement panel stops working when setting Fixed Keyword Query”.
We had customized refinement panel to display custom metadata columns into search results by adding Custom Filters and wanted to display only documents as results. To filter only documents into search result, Fixed keyword Query isDocument:1 and Cross-Web part ID changed to Query2. And refinement panel stopped working.
After playing around with different options, I figured out that, placing static filter IsDocument:1 into Append Text to Query instead of Fixed keyword query option solved the problem.

Checkpoint for using Fixed Keyword Query:
[If you configure a fixed keyword query, you must change the default Cross-Web Part Query ID setting in the Results Query Options node of this Web Part from the default setting of User Query to another query ID on the list, such as Query 2. If you do not change this value, the filter in the Fixed Keyword Query setting is not added to the search query.]
Reference: http://technet.microsoft.com/en-us/library/gg549987.aspx

No comments: