260 likes | 380 Views
Customizing Search with Result Types, Resource Sources and Display Templates. SharePoint 2013 Search. 31 May 2014. Shereen Qumsieh Dynamic Owl Consulting CALSPUG Inc. About Me. Shereen Qumsieh Co-Founder, Dynamic Owl Consulting Principal Architect SharePoint MVP. Session Agenda.
E N D
Customizing Search with Result Types, Resource Sources and Display Templates SharePoint 2013 Search 31 May 2014 ShereenQumsieh Dynamic Owl Consulting CALSPUG Inc.
About Me • Shereen Qumsieh • Co-Founder, Dynamic Owl Consulting • Principal Architect • SharePoint MVP
Session Agenda • Search Overview • Result Sources and Result Types • Display Templates and Managed Metadata • Content Search and Search Results • Query Syntax • O365 Gotchas
Search Overview • Configuring Search • Managed Properties • Result Sources and Result Types • Display Templates • Content Search and Search Results • Query Syntax • o365
Configuring Search • Create the Search Service Application • Configure the Crawl Account • Configure Content Sources • Configure and map Managed Properties • This may be automatic under certain conditions • Configure Search Results with Display Templates • Optionally configure Result Sources and Result Types
Managed Properties • Created automatically when content is crawled • FooBar - FooBarOWSTEXT • Do you leverage the auto generated managed properties or roll your own? • o365 you can’t create your own, you have to leverage what’s there • Map to multiple crawled properties • Must be a Site Column • Must contain content
Result Sources • Can be created at Service App, Site Collection or Site level • When user initiates query, search system associates query with a result source • Result source can specify authentication method • Leverage Query Transform vs Result Source
Query Transform • Variables • User.Name • Site.URL • Today • MAKE SURE YOU HAVE THE RIGHT TYPE! • Configurable • Web part -> Query rule -> Result source • A user query is transformed first by the Web Part, then by any query rules that apply, and finally by the result source
Query Rules • Applied to a Result Source • Processed under given conditions • Keyword Query matches • Topic Category • Promoted Results • Result Blocks
Result Types • Binds to a Result Source • Typically defined by a rule that further refines the data • Applies the selected display template to results that match the rule
Display Templates • Allows us to control the display of the search results • We can leverage managed properties in the display template • Each Display Template has 2 files, one html file and one automatically generated/updated js file. • Requires Publishing Infrastructure • Design Manager is particularly useful
Display Templates • Start with a copy of an existing display template • Use $includeScriptand $includeCSS
Display Templates • JavaScript code should be inside: • <!--#_ <JavaScript Code> _#--> • Use value assigned to variable using: • _#= • <a href="_#=LinkURL=#_"> • AddPostRenderCallback
Content Search Web Part • Available in non publishing sites • Pulls display templates from Content Web Parts folder • Gives the user the ability to choose which managed properties to display • Less options to configure over Search results • Enterprise version of SharePoint
Search Results Web Part • Allows you to display results by Result type • Managed Properties have to be edited manually in html file • More configuration options including Sort
Query Syntax • Keyword Query Syntax • Preferred method • FAST Query Language • Still available • Examples: • author:”John Smith” • filetype:docx • IsDocument:1 • Train*
O365 Gotchas • Latency is a real problem • You’ll want to leverage a tool like SP 2013 Search Query Tool • Include the CrawlTime as a property • Get comfortable with existing managed properties: • RefineableString00 • Re-indexing a document library or a site
Resources • Automatically created managed properties • Search overview MSDN • Display Template References • Search Query Tool • Office 365 Search Latency • Keyword Query Language
Questions & Answers {Something to say?}
Special Thanks • SharePoint Training Courses • http://www.neweratechnology.com/courses/sharepoint.aspx CalSPUG Calgary SharePoint User Group
Housekeeping • Join us for SharePint • Time: 4:15 PM – 6:00 PM • Location: TBD