OFC218. Query Rules Result Types Display Templates...

Post on 18-Jan-2016

221 views 3 download

Tags:

transcript

Making better use of SharePoint 2013 search

Alan MarshallSenior Consultant, SharePoint MVPProvoke@pomealan

OFC218

What is your expectation when you search?

Convert 1 NZD to USD

Convert 1 NZD to USD

Places to visit in Seattle

Places to visit in Seattle

How to delegate effectively videos

How to delegate effectively videos

What did we just see?• Interpret intent• Format results• Promoted content• In place answers

Overview

Deployment Query Rules Debugging Display Templates

Query to Result

Index

QueryRules

ResultTypes

DisplayTemplates

/_api/search/query?query_parameter=value&query_parameter=value

Query Rules

Better Best Bets User Oriented Queries

Natural Language Query

Intent Rules

Demo

Better Best Bets

Match Conditions

XT1000 Marketing OR Sales Slides

Dictionary Action Term

Keyword

Regular Expression

Actions

Promote by

Demote by

Publishing

1/9/2014 30/9/2014

30/9/2014Now

30/9/2014

• Site and Site Collection• Page, URL Token• Managed Meta Data Navigation• Querystring

• User• {subjectTerms} urls={http://portal/+ User.SPS-Location}• {|owstaxIdMetadataAllTagsInfo:{User.SPS-Interests}}.

• Term in current navigation

Query variables

DemoUser Centric Rules - I know who you are!Acting on User Intent - I know what you are looking for!Detecting and Acting on Natural Language - I hear what you are saying!

Display Templates

Display Templates

Search Results Write Once & Reuse CustomisationRefiners & Content Search

• Improve usability• Customer Example• BCS Result• Rich Customer

• Graphical Refiners• Color or Image• Graph or Chart

When do I need a Display Template?

Anatomy of Search Results

Demo

Display Templates 101

• HTML and JavaScript• No more XSL• One result at a time + hovercards• Other Uses• Refiners• Controls• Content By Search

Display Templates

Template Syntax<!--#_

Javascript Code_#-->

HTML Code_#= javascript variable =#_

<!--#_Javascript Code

_#-->

Managed Properties<mso:ManagedPropertyMapping msdt:dt="string">'Link URL'{Link URL}:'Path','Title':'Title‘</mso:ManagedPropertyMapping>

• Format "slot name“{display name}:"managed property name“

• display name isn't required

Uses for ctxctx provides access to current item and control• ctx.CurrentItem – managed property by name• ctx.CurrentItemIdx - item index, useful for headers• ctx.CurrentItem.csd_Icon – override the default item icon• ctx.RenderBody – common shared elements• ctx.ClientControl – access to DOMAccess managed properties• ctx.Title• ctx.Path etcUse ctx to communicate between display templates

Search Control Rendering

Control<property name="RenderTemplateId"

Group<property name="GroupTemplateId"

Item<property name="ItemTemplateId"

Item

Item

Demo

Search Control RenderingHover Panels and External CallsRefinementDebugging Display Templates

Deployment

• Display Templates• Design Manager• Optionally Include Search Configuration

• Query Rules• Export/Import Search Configuration

• Packaging as Features• Include only JS files

Deployment OptionsHow do I move the coolness to production?

Demo

Deploying Display Templates and Query Rules

• Learn about Display Templates• Experiment with Query Rules• Learn how to debug• Talk to your users!

In ClosingWhat do I do next?

Templates explainedhttp://www.eliostruyf.com/display-template-custom-document-properties-explained/GitHub Table Template https://github.com/SPCSR/DisplayTemplates/tree/master/Search%20Display%20Templates/Table%20Layout%20with%20Sorting%20Templates%20(CSWP)Use Search query variablehttp://technet.microsoft.com/en-us/library/jj683123(v=office.15).aspxMatt's search templates and designshttp://www.ableblue.com/blog/archive/tag/search/http://www.ableblue.com/blog/archive/2013/06/05/introduction-to-sharepoint-2013-display-templates/Template ID'shttp://www.eliostruyf.com/display-template-custom-document-properties-explained/Technet reference for templateshttp://technet.microsoft.com/en-us/library/dn386874(v=office.15).aspxAdd Hover Panel to Word Templateshttp://stevemannspath.blogspot.co.nz/2013/05/sharepoint-2013-search-adding-hover.htmlREST APIhttp://msdn.microsoft.com/en-us/library/office/jj163876(v=office.15).aspx> http://zimmergren.net/technical/sp-2013-searching-in-sharepoint-2013-using-the-rest-new-apis

Resources - background

The End

Related contentFind Me Later

Outside the room for 15 minTwitter: @pomealanAlan.marshall@provoke.co.nzAuckland SharePoint user group on Meetup

Resources

TechNet & MSDN FlashSubscribe to our fortnightly newsletter

http://aka.ms/technetnz http://aka.ms/msdnnz

TechNet Virtual LabsFree Virtual Hands-on Labs

http://aka.ms/ch9nz

Microsoft Virtual AcademyFree Online Learning

http://aka.ms/mva http://aka.ms/technetlabs

Sessions on Demand

Complete your session evaluation now and win!

© 2014 Microsoft Corporation. All rights reserved.Microsoft, Windows and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries.MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.