If you ever worked on developing a Search portal using SharePoint native REST API, you might have ended up on issue with search Refiners not being returned for Anonymous users. Although for enabling search for anonymous users, you would need to explicitly set the "Safe for anonymous" setting on a managed property to true however there is one more setting that needs to be added in the whitelist of the queryparametertemplate file.
In the whitelist tag, add following entry for refiners:
In the whitelist tag, add following entry for refiners:
<a:string>Refiners</a:string>
So the whole Whitelist will look like:
<WhiteList xmlns:a="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<a:string>RowLimit</a:string>
<a:string>SortList</a:string>
<a:string>StartRow</a:string>
<a:string>Refiners</a:string>
<a:string>RefinementFilters</a:string>
<a:string>Culture</a:string>
<a:string>RankingModelId</a:string>
<a:string>TrimDuplicatesIncludeId</a:string>
<a:string>ReorderingRules</a:string>
<a:string>EnableQueryRules</a:string>
<a:string>HiddenConstraints</a:string>
<a:string>QueryText</a:string>
<a:string>QueryTemplate</a:string>
</WhiteList>
This comment has been removed by a blog administrator.
ReplyDelete