{"id":1025,"date":"2011-02-07T12:16:09","date_gmt":"2011-02-07T11:16:09","guid":{"rendered":"http:\/\/www.itidea.nl\/?p=1025"},"modified":"2011-04-24T16:20:32","modified_gmt":"2011-04-24T14:20:32","slug":"search-refiners-part-1-expanding-the-ootb-search-refinement-panel","status":"publish","type":"post","link":"https:\/\/www.itidea.nl\/index.php\/search-refiners-part-1-expanding-the-ootb-search-refinement-panel\/","title":{"rendered":"Search Refiners (part 1) &#8211; Expanding the OOTB search Refinement Panel"},"content":{"rendered":"<p>In this series:\u00a0\u00a0<\/p>\n<ol>\n<li>Search Refiners part 1 &#8211; Expanding the OOTB search Refinement Panel (this post)<\/li>\n<li>Search Refiners part 2 &#8211; <a href=\"https:\/\/www.itidea.nl\/index.php\/search-refiners-part-2-use-of-customfilters\/\">Use of CustomFilters<\/a><\/li>\n<li>Search Refiners part 3 &#8211; <a href=\"https:\/\/www.itidea.nl\/index.php\/search-refiners-part-3-chart-based\/\">Chart based<\/a><\/li>\n<li>Search Refiners part 4 &#8211; <a href=\"https:\/\/www.itidea.nl\/index.php\/search-refiners-part-4-user-selection-based\/\">User selection based<\/a><\/li>\n<\/ol>\n<h3>Intro<\/h3>\n<p>A large multinational company has several contracts. These contract are stored in SharePoint. Based on the<br \/>\nmultinational character of the company the contracts are stored in different languages.<br \/>\nTitles of the documents are all in English, so there is no way to determine from the title in what language the<br \/>\ndocument is written. Therefor a new column is introduced where the language can be stored.<br \/>\nThis column in a lookup column to another list where all the languages are defined.<br \/>\nWhen people are searching for contracts there is no quick way to see in what language the document is written. To<br \/>\nprevent users to open multiple documents to see the language of the content a search refiner will help them out.\u00a0\u00a0<\/p>\n<p>The existing OOTB refinement panel can be expanded just with XML.<br \/>\nBefore doing so some preparations has to be done.\u00a0\u00a0<\/p>\n<h3>Create lists<\/h3>\n<p>First a custom list has to be created which will store the possible language values.<br \/>\nA document library has to be added to a site which will contain the documents for the contracts. An additional column<br \/>\nhas to be added to let the user choose the language in which the document is written. This will be a lookup column to<br \/>\nthe previous created list of languages.<br \/>\nA set of documents are uploaded with their languages set.<br \/>\n<a href=\"https:\/\/www.itidea.nl\/wp-content\/uploads\/2011\/02\/SearchRefinerPart1DocLib.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1032\" title=\"SearchRefinerPart1DocLib\" src=\"https:\/\/www.itidea.nl\/wp-content\/uploads\/2011\/02\/SearchRefinerPart1DocLib.png\" alt=\"\" width=\"477\" height=\"325\" srcset=\"https:\/\/www.itidea.nl\/wp-content\/uploads\/2011\/02\/SearchRefinerPart1DocLib.png 477w, https:\/\/www.itidea.nl\/wp-content\/uploads\/2011\/02\/SearchRefinerPart1DocLib-300x204.png 300w\" sizes=\"auto, (max-width: 477px) 100vw, 477px\" \/><\/a><\/p>\n<h3>Crawl content<\/h3>\n<p>Start Central Administration, select Application Management and Manage Service Applications. Select Search Service<br \/>\nApplication to display the Search Administration page.<br \/>\nSelect Content Sources and start an incremental crawl.\u00a0\u00a0<\/p>\n<h3>Create managed property<\/h3>\n<p>When this is finished create a Managed Property called Language and add a mapping to the crawled property ows_Language.<br \/>\n<a href=\"https:\/\/www.itidea.nl\/wp-content\/uploads\/2011\/02\/SearchRefinerPart1ManagedProperty.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1034\" title=\"SearchRefinerPart1ManagedProperty\" src=\"https:\/\/www.itidea.nl\/wp-content\/uploads\/2011\/02\/SearchRefinerPart1ManagedProperty.png\" alt=\"\" width=\"691\" height=\"338\" srcset=\"https:\/\/www.itidea.nl\/wp-content\/uploads\/2011\/02\/SearchRefinerPart1ManagedProperty.png 691w, https:\/\/www.itidea.nl\/wp-content\/uploads\/2011\/02\/SearchRefinerPart1ManagedProperty-300x146.png 300w\" sizes=\"auto, (max-width: 691px) 100vw, 691px\" \/><\/a><br \/>\nStart a Full Crawl.\u00a0\u00a0<\/p>\n<p>Check if any results are present in the crawled property.\u00a0\u00a0<\/p>\n<h3>Modify Filter Category Definition<\/h3>\n<p>Create an Enterprise Search Center and edit the Refinement Panel. In the webpart properties in the section Refinement<br \/>\nselect the button next to the Filter Category Definition textbox to show all the text in it.<br \/>\n<a href=\"https:\/\/www.itidea.nl\/wp-content\/uploads\/2011\/02\/SearchRefinerPart1RefinementPanelWPProperties.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1035\" title=\"SearchRefinerPart1RefinementPanelWPProperties\" src=\"https:\/\/www.itidea.nl\/wp-content\/uploads\/2011\/02\/SearchRefinerPart1RefinementPanelWPProperties.png\" alt=\"\" width=\"229\" height=\"366\" srcset=\"https:\/\/www.itidea.nl\/wp-content\/uploads\/2011\/02\/SearchRefinerPart1RefinementPanelWPProperties.png 229w, https:\/\/www.itidea.nl\/wp-content\/uploads\/2011\/02\/SearchRefinerPart1RefinementPanelWPProperties-187x300.png 187w\" sizes=\"auto, (max-width: 229px) 100vw, 229px\" \/><\/a>\u00a0\u00a0<\/p>\n<p>The XML is not difficult to read and understand when copying and pasting the XML into an XML file in Visual Studio..<br \/>\nEven without checking on the full Refinement Panel XML schema it&#8217;s pretty clear what to do by copying an existing<br \/>\nCategory element and make some changes.<br \/>\nFull explanation of this schema can be found on MSDN here <a href=\"http:\/\/msdn.microsoft.com\/en-us\/library\/ee819920.aspx\">http:\/\/msdn.microsoft.com\/en-us\/library\/ee819920.aspx<\/a>\u00a0\ufffd<br \/>\nAdd to the filter category definition in the webpart properties:<\/p>\n<pre class=\"brush: xml; title: ; notranslate\" title=\"\">\r\n&lt;Category Title=&quot;Language&quot; Description=&quot;Language of document&quot; Type=&quot;Microsoft.Office.Server.Search.WebControls.ManagedPropertyFilterGenerator&quot; MetadataThreshold=&quot;3&quot; NumberOfFiltersToDisplay=&quot;3&quot; MaxNumberOfFilters=&quot;20&quot; ShowMoreLink=&quot;True&quot; MappedProperty=&quot;Language&quot; MoreLinkText=&quot;show more&quot; LessLinkText=&quot;show fewer&quot; \/&gt;\r\n<\/pre>\n<p>Don&#8217;t forget to uncheck &#8216;Use default configuration&#8217;.<br \/>\nUnchecking this option is quite important. When this checkbox is selected any changes to the filter category definition<br \/>\nconfiguration are not persistent. A better experience would be disabling the Filter Category Definition when this<br \/>\ncheckbox is selected&#8230;\u00a0\u00a0<\/p>\n<p>Apply and save the changes.\u00a0\u00a0<\/p>\n<h3>Test the refiner<\/h3>\n<p>Start a search on one of the words in the title of one of the documents uploaded in the created Document Library.<br \/>\nNotice the Language refiner on the left.<br \/>\n<a href=\"https:\/\/www.itidea.nl\/wp-content\/uploads\/2011\/02\/SearchRefinerPart1LanguageRefiner.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1033\" title=\"SearchRefinerPart1LanguageRefiner\" src=\"https:\/\/www.itidea.nl\/wp-content\/uploads\/2011\/02\/SearchRefinerPart1LanguageRefiner.png\" alt=\"\" width=\"685\" height=\"204\" srcset=\"https:\/\/www.itidea.nl\/wp-content\/uploads\/2011\/02\/SearchRefinerPart1LanguageRefiner.png 685w, https:\/\/www.itidea.nl\/wp-content\/uploads\/2011\/02\/SearchRefinerPart1LanguageRefiner-300x89.png 300w\" sizes=\"auto, (max-width: 685px) 100vw, 685px\" \/><\/a>\u00a0<\/p>\n<p>The values displayed of the Language refiner is default sorted by count. This means the value which is used most<br \/>\nappears on top.\u00a0\u00a0<\/p>\n<h3>Refiner is not showing<\/h3>\n<p>When the refiner is not showing in the Search Center there are a few things to check.<\/p>\n<ol>\n<li>Make sure to fully crawl the content after creating the managed property and confirm the crawled property contains<br \/>\nvalues.<\/li>\n<li>Make sure there is enough data which uses in this case the language. In the above XML the value of the<br \/>\nMetadataThreshold attribute is set to 3. This means the number of results that must contain a value to display the<br \/>\nfilter generator under the filter category is set to 3.<\/li>\n<li>Uncheck Use Default Configuration in the webpart properties of the Refinement Panel, section Refinement.<\/li>\n<li>In the webpart properties of the Refinement Panel in the secion Refinement a value is displayed for Number of<br \/>\nCategories to Display. If the number of categories exceeds this number and the new category is defined last in the XML,<br \/>\nit\u00a0won&#8217;t show up.\u00a0\u00a0<\/li>\n<\/ol>\n<h3>Summary<\/h3>\n<p>SharePoint provides OOTB an easy way to create your own search refiners.<br \/>\nA crawled property, content and some XML to define the filter category are sufficient.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In this series:\u00a0\u00a0 Search Refiners part 1 &#8211; Expanding the OOTB search Refinement Panel (this post) Search Refiners part 2 &#8211; Use of CustomFilters Search Refiners part 3 &#8211; Chart based Search Refiners part 4 &#8211; User selection based Intro &#8230; <a class=\"more-link\" href=\"https:\/\/www.itidea.nl\/index.php\/search-refiners-part-1-expanding-the-ootb-search-refinement-panel\/\">Read More &raquo;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8],"tags":[42],"class_list":["post-1025","post","type-post","status-publish","format-standard","hentry","category-sharepoint-2010","tag-sharepoint-2010"],"_links":{"self":[{"href":"https:\/\/www.itidea.nl\/index.php\/wp-json\/wp\/v2\/posts\/1025","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.itidea.nl\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.itidea.nl\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.itidea.nl\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.itidea.nl\/index.php\/wp-json\/wp\/v2\/comments?post=1025"}],"version-history":[{"count":15,"href":"https:\/\/www.itidea.nl\/index.php\/wp-json\/wp\/v2\/posts\/1025\/revisions"}],"predecessor-version":[{"id":1043,"href":"https:\/\/www.itidea.nl\/index.php\/wp-json\/wp\/v2\/posts\/1025\/revisions\/1043"}],"wp:attachment":[{"href":"https:\/\/www.itidea.nl\/index.php\/wp-json\/wp\/v2\/media?parent=1025"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.itidea.nl\/index.php\/wp-json\/wp\/v2\/categories?post=1025"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.itidea.nl\/index.php\/wp-json\/wp\/v2\/tags?post=1025"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}