IT tutorials
 
Technology
 

Microsoft SharePoint 2010 : Search - Customizing the refinement menu

9/4/2013 9:37:12 PM
- Free product key for windows 10
- Free Product Key for Microsoft office 365
- Malwarebytes Premium 3.7.1 Serial Keys (LifeTime) 2019

The SharePoint 2010 Search Center results page contains a new section called the refinement panel. This panel is located on the left portion of the screen and provides a summary of search results which, when used, act as filters on the returned data.

Out of the box, there are three main categories:

  • Site

  • Author

  • Date

New custom refinement categories can be configured, these are based on managed properties. Managed properties are the metadata stored with items in SharePoint. There are many more properties than the three that are shown out of the box.

This recipe consists of two parts:

  • Adding a managed property, which takes place in the Central Administration.

  • Modifying the refinement menu to include a new category based on the managed property, which will be done at the site level.

Getting ready

Ensure that you are a Site Collection Administrator.

In the site, you are going to modify a custom list and create a new column called Finance, using the property named Single Line of Text.&; Upload a couple of documents into the library and assign a value to Finance for each one. Use something as simple as 1 or 2 as the value.

Create an Enterprise Search Center Site. This is available with the enterprise edition. Call it SearchCenter.

Modify the Search Settings under Site Collection Administration (found under Site Actions) so that the site you are testing against points to /SearchCenter/Pages/results.aspx.

You must have farm-level administrative permissions to the Central Administration site.

How to do it...

Part 1: Creating Managed Property
  1. Open the Central Administration site and click Application Management.

  2. The third section is Service Applications. Under this section, click Manage service applications.

  3. Find the Search Service Application option and click on it (this is the name SharePoint assigns by default if not modified when creating the Search Service). The ribbon will light up. Click Manage.

  4. On the left-hand navigation, under the section marked Queries and Results, click Metadata Properties.

  5. Click New Managed Property. A new form appears.

  6. In the Name textbox, type Finance.

  7. Under Mappings to crawled properties, click Add Mapping.

  8. The following pop-up screen appears:

  9. In the Select a category listbox, select SharePoint.

  10. Navigate to the Finance property.

    Click OK.

  11. On the New Managed Property page, check the box for Use in Scopes. Click OK.

  12. Initiate a full crawl on the Local SharePoint sites (under Content Sources).

Part 2: Creating Custom Refiner
  1. Navigate to the Search Center page, for example, servername/SearchCenter/Pages/results.aspx.

  2. Perform a search. Click Site Actions, Edit Page.

  3. In the web part marked Refinement Panel, select Edit Web Part from the drop-down list.

  4. Under the section Refinement, there is the Filter Category Definition. Click the ... box to the right of this.

  5. You are presented with a text editor of the contents. Select all of the text (Ctrl+A) and copy and paste the contents into Notepad.

  6. Run a search query on Author. Copy the author's category tag. It will contain the following:

    <Category Title="Author" Description="Use this filter to restrict results authored by a specific author" 
  7. Type="Microsoft.Office.Server.Search.WebControls.ManagedPropertyFilterGenerator" MetadataThreshold="5" 
  8. NumberOfFiltersToDisplay="4" MaxNumberOfFilters="20" SortBy="Frequency" SortByForMoreFilters="Name" 
  9. SortDirection="Descending" SortDirectionForMoreFilters="Ascending" ShowMoreLink="True" 
  10. MappedProperty="Author" MoreLinkText="show more" LessLinkText="show fewer" />


  11. Paste the copied tag right after the end of the original Author tag.

  12. Make the following changes:

    1. Change the Title to Finance.

    2. Change the MetadataThreshold to 1.

    3. Change MappedProperty to Finance.

  13. Copy and paste the complete text from the Notepad (where we copied the text to in step 5) into the text editor. Click OK.

  14. Ensure the Use Default Configuration option is unchecked.

  15. Click Apply and then OK on the Web part properties dialog.

  16. Check in and publish page.

  17. Perform a search by your name. Doing this makes the assumption that there are documents with your name in them, about you, or created by you.

How it works...

The refiner panel is a web part on the Search results page that contains properties to completely configure the way it looks and behaves. In this recipe, we utilized the Refinement XML configuration to add a new category.

Part 1 of our recipe creates the managed property. A prerequisite of this recipe was to create a column that we could consume. Once this was done and the content was crawled, the property becomes available to define as a managed property. This part is done by a Search Administrator or the Farm Administrator.

Part 2 of our recipe took that property and mapped it to a category of our creation. We performed this in step 15. This is done at the site level. The end result is a panel that looks like the following screenshot:

There's more...

The property Metadata Threshold&; is critical to have the category show up, as you expected, in the refinement panel. The value of this property will be compared against the count of metadata matches. If the number of matches is higher than the value, the refiner category will show.

This gives you control over how many and what refiners are shown in the panel. This can be used to prevent the panel from becoming too crowded.

More info

In the preceding screenshot, there is a section called Tags. When doing a search for information, the returned results may be categorized by information found in the Managed Metadata Term Store.

 
Others
 
- Microsoft SharePoint 2010 : Search - Adding a host distribution rule, Viewing Search Query Reports
- Microsoft SharePoint 2010 : Scaling out Search — adding a crawl database
- Active Directory 2008 : Configuring Read-Only Domain Controllers (part 2) - Password Replication Policy , Administering RODC Credentials Caching, Administrative Role Separation
- Active Directory 2008 : Configuring Read-Only Domain Controllers (part 1) - Read-Only Domain Controllers, Deploying an RODC
- Active Directory 2008 : Improving the Security of Authentication in an AD DS Domain - Auditing Authentication
- Microsoft Lync Server 2010 : Enterprise Voice - Remote Site Survivability
- Microsoft Lync Server 2010 : Enterprise Voice - Enhanced 911
- Microsoft Lync Server 2010 : Enterprise Voice - Media Bypass
- Exchange Server 2010 : Object-Oriented Use of PowerShell (part 2) - Formatting Output, Directing Output to Other Cmdlets
- Exchange Server 2010 : Object-Oriented Use of PowerShell (part 1) - Filtering Output
 
 
Top 10
 
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Finding containers and lists in Visio (part 2) - Wireframes,Legends
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Finding containers and lists in Visio (part 1) - Swimlanes
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Formatting and sizing lists
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Adding shapes to lists
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Sizing containers
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 3) - The Other Properties of a Control
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 2) - The Data Properties of a Control
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 1) - The Format Properties of a Control
- Microsoft Access 2010 : Form Properties and Why Should You Use Them - Working with the Properties Window
- Microsoft Visio 2013 : Using the Organization Chart Wizard with new data
Technology FAQ
- Is possible to just to use a wireless router to extend wireless access to wireless access points?
- Ruby - Insert Struct to MySql
- how to find my Symantec pcAnywhere serial number
- About direct X / Open GL issue
- How to determine eclipse version?
- What SAN cert Exchange 2010 for UM, OA?
- How do I populate a SQL Express table from Excel file?
- code for express check out with Paypal.
- Problem with Templated User Control
- ShellExecute SW_HIDE
programming4us programming4us