+ All Categories
Home > Documents > Microsoft ® Official Course Customizing the Search Experience Microsoft SharePoint 2013 SharePoint...

Microsoft ® Official Course Customizing the Search Experience Microsoft SharePoint 2013 SharePoint...

Date post: 17-Jan-2018
Category:
Upload: pierce-burke
View: 233 times
Download: 0 times
Share this document with a friend
Description:
Lesson 1: Customizing Query Processing Result Sources Creating Result Sources Query Transforms Query Transforms - Keyword Filters Query Transforms - Property Filters Query Transforms - Sorting Creating and Configuring Query Transforms Demonstration: Creating Result Sources with Query Transforms Query Rules Query Rule Conditions and Actions Demonstration: Query Rules Importing and Exporting Search Schemas Discussion: Result Sources and Query Rules
45
Microsoft ® Official Course Customizing the Search Experience Microsoft SharePoint 2013 SharePoint Practice
Transcript
Page 1: Microsoft ® Official Course Customizing the Search Experience Microsoft SharePoint 2013 SharePoint Practice.

Microsoft® Official Course

Customizing the Search Experience

Microsoft SharePoint 2013

SharePoint Practice

Page 2: Microsoft ® Official Course Customizing the Search Experience Microsoft SharePoint 2013 SharePoint Practice.

Module Overview

Customizing Query ProcessingCustomizing Search Results•Customizing Content Processing

Page 3: Microsoft ® Official Course Customizing the Search Experience Microsoft SharePoint 2013 SharePoint Practice.

Lesson 1: Customizing Query Processing

Result SourcesCreating Result SourcesQuery TransformsQuery Transforms - Keyword FiltersQuery Transforms - Property FiltersQuery Transforms - SortingCreating and Configuring Query TransformsDemonstration: Creating Result Sources with Query TransformsQuery RulesQuery Rule Conditions and ActionsDemonstration: Query RulesImporting and Exporting Search Schemas• Discussion: Result Sources and Query Rules

Page 4: Microsoft ® Official Course Customizing the Search Experience Microsoft SharePoint 2013 SharePoint Practice.

Result Sources

•Result Source are used to partition indexed content into smaller meaningful sets•Result Sources are used for Search Federation• Exchange• Remote SharePoint• OpenSearch 1.0/1.1

•Each Result Source is configured with a Query Transform •16 out of the box Result Sources provided• Each provide a great example of how to build Query Transforms

Page 5: Microsoft ® Official Course Customizing the Search Experience Microsoft SharePoint 2013 SharePoint Practice.

Creating Result Sources

• Result Sources can be created at any Search Schema Level• Service Application, Site Collection, Site

• Creation can be done via• UI• Windows PowerShell• Custom .NET Applications

• Creation is handled by the FederationManager class• Use the CreateSource method• Must set Name and ProviderID properties

• Provider ID can be retrieved using ListProviders method

Page 6: Microsoft ® Official Course Customizing the Search Experience Microsoft SharePoint 2013 SharePoint Practice.

Query Transforms

•Each Result Source must have a Query Transform• This is simply a search query• Used to narrow down the focus of the items in the Result Source

•Each Query Transform has two main properties• Query Filter – made up of Keyword and Property Filters• Sorting – How the final results will be sorted

•Query Transformation and Processing occurs in a very specific order

Page 7: Microsoft ® Official Course Customizing the Search Experience Microsoft SharePoint 2013 SharePoint Practice.

Query Transforms - Keyword Filters

•Keyword Filters• Used to pass values from where the query is executing• Helpful for providing context to the Query Transform

•Query Builder tool provides a common set of values via the UI• Example: Pass a value from the query string

•Programmatically you must know these values in advanced

Page 8: Microsoft ® Official Course Customizing the Search Experience Microsoft SharePoint 2013 SharePoint Practice.

Query Transforms - Property Filters

•Property Filters are based on Managed Properties• Format is exactly like a user query• PropertyName:Value

•Examples:• FileType:docx• ModifyDate>1/1/2013• Author:John Doe• ViewsLifeTime>100

Page 9: Microsoft ® Official Course Customizing the Search Experience Microsoft SharePoint 2013 SharePoint Practice.

Query Transforms - Sorting

• Query Transform defines the Sort order of the results• Can be based upon• Managed Property• Ranking Model

• You can have multiple levels of sort• First by Author, second by Modify Date

• Normally Managed Properties are used to base the sort• Must have the Sortable property set• Dynamic ranking can target items to move up in the

results• Ranking Profiles can provide advanced sorting algorithms

Page 10: Microsoft ® Official Course Customizing the Search Experience Microsoft SharePoint 2013 SharePoint Practice.

Creating and Configuring Query Transforms•Query Builder is an easy way to build a Query Transforms•Programmatica use CreateQueryTransform method of Result Source object• Method contains two overrides

• (QueryTransformProperties, string)• (string)

•QueryTransformProperties set how the query will be sorted• Uses a SortCollection object

•To modify a transform, get the Result Source and modify the QueryTransform property

Page 11: Microsoft ® Official Course Customizing the Search Experience Microsoft SharePoint 2013 SharePoint Practice.

Demonstration: Creating Result Sources with Query Transforms

In this demonstration, you will see an example of how to create result sources with query transforms via the SharePoint UI.

Page 12: Microsoft ® Official Course Customizing the Search Experience Microsoft SharePoint 2013 SharePoint Practice.

Query Rules

•Query Rules attempt to guide a user based on query intent

•Configuration includes• Scope• Conditions• Actions• Publishing Settings

•Replaces Keywords and Bestbets

Page 13: Microsoft ® Official Course Customizing the Search Experience Microsoft SharePoint 2013 SharePoint Practice.

Query Rule Conditions and Actions

•Query Rules contain conditions• If condition evaluates to true the actions will be processed

•Examples• If Author = John Doe, show Amazon results• If query contains “video”, show video results• If query contains “401K”, show HR page as promoted result

•Query Actions include• Promoted Results• Result Blocks• Change results

Page 14: Microsoft ® Official Course Customizing the Search Experience Microsoft SharePoint 2013 SharePoint Practice.

Demonstration: Query Rules

• In this demonstration your instructor will show you how to create and configure a Query Rule

Page 15: Microsoft ® Official Course Customizing the Search Experience Microsoft SharePoint 2013 SharePoint Practice.

Importing and Exporting Search Schemas

•Search Schemas can be exported and imported at the site collection and site level•Useful for moving settings from Development into production and as a Disaster Recovery tool•Use the SearchConfigurationPortability class’s ExportSearchConfiguration and ImportSearchConfiguration

Page 16: Microsoft ® Official Course Customizing the Search Experience Microsoft SharePoint 2013 SharePoint Practice.

Discussion: Result Sources and Query Rules•What types of result sources do you think you will create and what query rules might you apply on them?

Page 17: Microsoft ® Official Course Customizing the Search Experience Microsoft SharePoint 2013 SharePoint Practice.

Lesson 2: Customizing Search Results

Search Pages and NavigationSearch Results Web PartResult TypesDisplay TemplatesCreating Display TemplatesDemonstration: Display TemplatesRefinersCreating and Configuring RefinersDemonstration: Creating and Configuring Refiners•Content Search Web Part

Page 18: Microsoft ® Official Course Customizing the Search Experience Microsoft SharePoint 2013 SharePoint Practice.

Search Pages and Navigation

•A Search Center contains result pages•Each result page contains search web parts with different configurations• Everything• People• Conversations• Video

•You can customize the out of box or create your own• Easily done with SharePoint Designer

•Search Navigation tabs can be modified to have your custom result pages

Page 19: Microsoft ® Official Course Customizing the Search Experience Microsoft SharePoint 2013 SharePoint Practice.

Search Results Web Part

•Search results web part displays search results•Contains a Query property that defines the content the user’s query should be executed against•Each results page would have a Search Results web part with different query settings•Typically easier to use the SharePoint UI to modify these settings with Query Builder dialog

Page 20: Microsoft ® Official Course Customizing the Search Experience Microsoft SharePoint 2013 SharePoint Practice.

Result Types

•Result types are groupings of results based on a set of conditions•Conditions are built using managed properties•Actions are executed based on the conditions•Helpful for driving dynamic displaying of results based on the metadata of a result item•Examples• If an item contains Latitude and Longitude, display it as a map in the results• If the item is a picture, show the picture in the result

Page 21: Microsoft ® Official Course Customizing the Search Experience Microsoft SharePoint 2013 SharePoint Practice.

Display Templates

•Display template drive how a result gets rendered in the results•Defines the layout how and where different managed properties should be displayed•Several different types of display templates• Control, Item, Filter, Group

•Each Display template can be set to only be used in specific search areas

Page 22: Microsoft ® Official Course Customizing the Search Experience Microsoft SharePoint 2013 SharePoint Practice.

Creating Display Templates

•Display template are stored in the Master Page Gallery• Viewable from the gallery or the Design Manager tool

•Search Display Templates stored in Search sub folder• Modify and Create files in this folder• Use SharePoint Designer to edit or download, modify and upload

•Use out of box display templates as guide to building your own

Page 23: Microsoft ® Official Course Customizing the Search Experience Microsoft SharePoint 2013 SharePoint Practice.

Demonstration: Display Templates

• In this demonstration your instructor will show you how to create a Result Type and associate a display template

Page 24: Microsoft ® Official Course Customizing the Search Experience Microsoft SharePoint 2013 SharePoint Practice.

Refiners

•Refiners allow users to drill down into search results• Goal: Narrow results from several thousands to a few hundred

•A basic set of refinement properties are used by default• Very likely you will need to add more

•Example• Refine by Author• Refine by Modify Date

Page 25: Microsoft ® Official Course Customizing the Search Experience Microsoft SharePoint 2013 SharePoint Practice.

Creating and Configuring Refiners

•Refiners can be based off any managed property with the active refinement property enabled• Content must be re-crawled after enabling

•Creating a refinement property does not mean it is automatically used• Must add it to refinement web part

•Refinement web part will display all available refinement properties• Try not to have more than 10 for performance• Create new search pages and result sources if needed

•Refinement counts are not enabled by default• Change needed in the display template

Page 26: Microsoft ® Official Course Customizing the Search Experience Microsoft SharePoint 2013 SharePoint Practice.

Demonstration: Creating and Configuring Refiners

In this demonstration, you will see how managed properties are configured to be refiners and how to use them in the Refinement web part.

Page 27: Microsoft ® Official Course Customizing the Search Experience Microsoft SharePoint 2013 SharePoint Practice.

Content Search Web Part

•Content Search web part is a farm wide way of displaying specific content• Not limited to site collection like Content Query Web Part

•Can be configured to point at any visible result source•Examples:• Provide a twitter feed based on site\list\item specific information• Do a search against Exchange content• Look for highest ranked\liked items• Looks for most popular items

Page 28: Microsoft ® Official Course Customizing the Search Experience Microsoft SharePoint 2013 SharePoint Practice.

Lab A: Configuring Result Types and Display TemplatesExercise 1: Configuring and Test Result TypeExercise 2: Customizing an Item Display Template•Exercise 3: Customizing a Hover Panel Display Template

Page 29: Microsoft ® Official Course Customizing the Search Experience Microsoft SharePoint 2013 SharePoint Practice.

Lab Scenario

Contoso produces product information leaflets for all its pharmaceutical offerings. These product information leaflets go through an extensive authoring and production process that ensures that each leaflet is the definitive source of information on a particular product. The management team at Contoso wants to ensure that product information leaflets are displayed prominently in search results. To achieve this objective, you will create an item display template and a hover panel display template for product information leaflets that appear in search results. You will also configure a result type to associate the custom display templates with the Product Information Leaflet content type.

Page 30: Microsoft ® Official Course Customizing the Search Experience Microsoft SharePoint 2013 SharePoint Practice.

Lab Scenario

Page 31: Microsoft ® Official Course Customizing the Search Experience Microsoft SharePoint 2013 SharePoint Practice.

Lesson 3: Customizing Content Processing

Entity ExtractorsConfiguring Entity ExtractorsCompany Name ExtractorsCreating and Deploying a ThesaurusAdding Query Spelling CorrectionsThe Content Enrichment Web ServiceCreating a Content Enrichment ServiceConfiguring Content Enrichment ServiceDiscussion: Content Enrichment Service•Demonstration: Deploying a Content Enrichment Service

Page 32: Microsoft ® Official Course Customizing the Search Experience Microsoft SharePoint 2013 SharePoint Practice.

Entity Extractors

•Entity Extractors allow you to build structured metadata around structured and unstructured data• Four types of extractors• Word• Word Part• Word Exact• Word Part Exact

• Limited to 12 extractors• Not unlimited as in FAST Search

Page 33: Microsoft ® Official Course Customizing the Search Experience Microsoft SharePoint 2013 SharePoint Practice.

Configuring Entity Extractors

•Entity Extractors are configured via Windows PowerShell• Import-SPEnterpriseSearchCustomExtractionDictionary

•Requires a UNC path to a comma delimited dictionary of values•Also requires the enumeration of the dictionary you are uploading

Page 34: Microsoft ® Official Course Customizing the Search Experience Microsoft SharePoint 2013 SharePoint Practice.

Company Name Extractors

•Company entity extractor is configured via MMS•Designed to tag content with company information for targeted search and refinement•Must enable the company extractor on the managed properties• Body and Title are preconfigured

Page 35: Microsoft ® Official Course Customizing the Search Experience Microsoft SharePoint 2013 SharePoint Practice.

Creating and Deploying a Thesaurus

•Acronyms are used every day both internally and externally• Search engines must be taught your corporate acronyms via Thesaurus

•Thesaurus allows for the configuration of synonyms, for example:• IE = Internet Explorer• UFO = Unidentified Flying Object• CRM = Customer Relationship Management

•Thesaurus entries are only one way, you must define two entries for two-way•Deployment is via Windows PowerShell

Page 36: Microsoft ® Official Course Customizing the Search Experience Microsoft SharePoint 2013 SharePoint Practice.

Adding Query Spelling Corrections

•Query Spelling Suggestions are helpful tools when users mis-type their queries• You can configure both include and exclude entries

•Search results page will display a “Did you mean” if an item is possibly misspelled• “SharePonit” would generate a “Did you mean SharePoint”?

•Commonly you add exclude entries for company products and internal names to prevent the warning prompt

Page 37: Microsoft ® Official Course Customizing the Search Experience Microsoft SharePoint 2013 SharePoint Practice.

The Content Enrichment Web Service

•A Content Enrichment Service is a WCF service that lives out side SharePoint• Implements the IContentEnrichmentService interface• Contains single method ProcessItem(Item)

•Allows content to be processed more than what SharePoint provides in simple indexing• Custom Business Logic can be applied to index items to further enhance the efficiently and value of the index

•Example• Geocode the latitude and longitude to content that has Address data

Page 38: Microsoft ® Official Course Customizing the Search Experience Microsoft SharePoint 2013 SharePoint Practice.

Creating a Content Enrichment Service

•To create a Content Enrichment Service• Create a WCF Service in Visual Studio• Add assembly reference to Microsoft.Office.Server.Search.ContentProcessingEnrichment.dll• Add using statement for namespace• Implement the IContentProcessingEnrichmentService• Deploy the project to a server

•Deployment should be to a server that is either on the same machine as the content processing component or as close to it as possible on the network

Page 39: Microsoft ® Official Course Customizing the Search Experience Microsoft SharePoint 2013 SharePoint Practice.

Configuring Content Enrichment Service

• SharePoint search must be configured to know where your Content Enrichment Service has been deployed• Utilize the New-SPEnterpriseSearchContentEnrichmentConfiguration cmdlet• Settings include:• Endpoint• InputProperties• OutputProperties• SendRawData• DebugMode• MaxRawDataSize• Trigger

Page 40: Microsoft ® Official Course Customizing the Search Experience Microsoft SharePoint 2013 SharePoint Practice.

Discussion: Content Enrichment Service

•What kind of logic might you implement in a Content Enrichment Service?

Page 41: Microsoft ® Official Course Customizing the Search Experience Microsoft SharePoint 2013 SharePoint Practice.

Demonstration: Deploying a Content Enrichment Service• In this demonstration your instructor will show how to deploy a content enrichment service

Page 42: Microsoft ® Official Course Customizing the Search Experience Microsoft SharePoint 2013 SharePoint Practice.

Lab B: Configuring Entity Extraction

•Exercise 1: Create and deploy an entity extractor

Page 43: Microsoft ® Official Course Customizing the Search Experience Microsoft SharePoint 2013 SharePoint Practice.

Lab Scenario

Contoso users are complaining that they can’t drill down into items that are product specific. They don’t want to add columns to all their lists that describes what product that item relates too. They have asked you to find a better way to get refinement capabilities without any work on their part.

Page 44: Microsoft ® Official Course Customizing the Search Experience Microsoft SharePoint 2013 SharePoint Practice.

Lab Review

How many different type of entity extractors are available?•What must you do after registering the entity extractor file?

Page 45: Microsoft ® Official Course Customizing the Search Experience Microsoft SharePoint 2013 SharePoint Practice.

Module Review and Takeaways


Recommended