The managed property can be used to help users filter search results to make it easier for them to identify relevant content.
Create a New Managed Property
1. Navigate to Central Administration.
2. Under Application Management, click the Manage Service Applications link.
3. Click the Search Service Application link.
4. In the left navigation panel, click the Metadata Properties link.
5. At the top of the page, click the New Managed Property link
6. In the Name and Type section, type DocumentType in the Property name text box.
7. In the Mappings to Crawled Properties section, click the Add Mapping button.
8. In the Crawled Property Selection dialog, type ows_contenttype in the Crawled Property Name text box, and then click the Find button.
9. In the Select Crawled Property list, select the ows_contenttype (Text) crawled property, and then click the OK button.
10. Check the Include values from a single crawled property based on the order specified option.
11. In the Optimize Managed Property Storage section, check the Reduce storage requirements for text properties by using a hash for comparison option.
12. Click the OK button to finish.
Start a Full Crawl on the Content Source
1. Click the Content Sources link in the left navigation panel.
2. Hover your mouse above the Local SharePoint sites and click the drop-down arrow.
3. In the context menu, click Start Full Crawl.
After the full crawl is completed, the new managed property can be used in the Refinement Panel Web Part
Note: Any time a managed property is created or changed, a full crawl must be executed to ensure that the managed property is applied consistently across all the content sources.
Issue an IISReset
1. In the Start menu, click Run.
2. In the open text box, type cmd.
3. At the command prompt, type IISReset and wait for the window to close.
Note: This is to refresh the managed properties cache.
Use a Managed Property in the Refinement Panel Web Part
The managed property can be added to the Refinement Web Part to help users filter search results. We start by adding a new refinement category to the web part. This is accomplished by creating and modifying XML and adding it to the Refinement Web Part’s configuration. When this is done, you will do a search and filter the results using the new managed property. You will observe how this can help users find what they are searching for.
1. Navigate to the search results page and open the Refinement Panel Web Part for editing.
2. Create and modify XML to add a new filter to the Refinement Panel Web Part.
3. Execute a search and use the new category filter.
Navigate to the Search Results Page and Open the Refinement Web Part for Editing
Navigate to your Enterprise Search Center Site
On the Site Actions menu, click Edit Page
1. In the Refinement Panel Web Part, hover your mouse over the upper right corner until a blue drop- down arrow displays. Click the drop-down arrow to display the Web Part menu, and then Edit Web Part. This opens the Web Part tool pane.
In the Refinement section, clear the Use Default Configuration check box.
Create and modify xml to add a new filter to the Refinement Panel Web Part.
In the Refinement section, click on the Filter Category Definition textbox, and then click the ellipsis (…) button for the Filter Category Definition field. This opens the Text Entry window for the Refinement Panel Web Part’s Filter CategoriesDefinition property
Next, insert the XML snippet at the place noted in the previous illustration. This represents the new filter category using the managed property you created before.
Category Xml:
<Category Title="Document Types" Description="Different types of documents" Type="Microsoft.Office.Server.Search.WebControls.ManagedPropertyFilterGenerator" MetadataThreshold="5" NumberOfFiltersToDisplay="4" MaxNumberOfFilters="20" SortBy="Frequency" SortByForMoreFilters="Name" SortDirection="Descending" SortDirectionForMoreFilters="Ascending" ShowMoreLink="True" MappedProperty="DocumentType" MoreLinkText="show more" LessLinkText="show fewer" />
Note: The Title attribute will be the title displayed for the category in the Refinement Panel. The MappedProperty attribute is the managed property you created.
Click the OK button of the Text Entry window.
Click the OK button of the Refinement Panel Web Part’s tool pane.
In the Page section of the Ribbon, click the Save & Close button.
Execute a Search and Use the New Category Filter
In your browser, navigate to your home page of your site URL:
In the search box, on the home page, type Document.
Click the Magnifying Glass icon to execute a search.
In the search results page, the Refinement Panel displays on the left. Click a different Document Types category, specifically Wiki Page.
Observe that when you click on a Document Type category, the search results are filtered to show just results of that category. This helps the user narrow the results, making easier to browse.
No comments:
Post a Comment