integrating search driven content in sharepoint 2013

51
Content in SharePoint 2013 Eric Overfield SharePoint Advocate and Enthusiast PixelMill Integrating Search Driven

Upload: eric-overfield

Post on 29-Nov-2014

4.643 views

Category:

Education


4 download

DESCRIPTION

Learn all about new search driven content strategies in SharePoint 2013, starting with add content, followed by display content throughout your SharePoint site and finishing with a look at refining your search results using query rules and result types

TRANSCRIPT

Page 1: Integrating Search Driven Content in SharePoint 2013

Content in SharePoint 2013

Eric OverfieldSharePoint Advocate and Enthusiast

PixelMill

Integrating Search Driven

Page 2: Integrating Search Driven Content in SharePoint 2013

Introduction – Eric Overfield

Founder and SharePoint Branding/UI Lead,

PixelMill

Speaker, Teacher, Advocate

Author, SharePoint Community Organizer

Located in Davis, CA

ericoverfield.com

@EricOverfield

Order Your Copy http://pxml.ly/zsqykd

Co-author: “Pro SharePoint 2013 Branding and

Responsive Web Development” (Apress – June

12th, 2013)

Co-author: “Black Magic

Solutions for White Hat

SharePoint” (August, 2013)

Page 3: Integrating Search Driven Content in SharePoint 2013

What You Will Learn

Aggregate Content Across Sitescross-site publishing feature

Create Content Rollup Solutionscustom display templates

Customize Individual Search Results

result types

Fine-tune Search Queriesquery rules

@EricOverfield - pixelmill.com

Page 4: Integrating Search Driven Content in SharePoint 2013

Aggregate Content

Across Site(s)@EricOverfield - pixelmill.com

Page 5: Integrating Search Driven Content in SharePoint 2013

@EricOverfield - pixelmill.com

Site Collection A

Search

Search Crawl

Content Query Web Part (CBQ)

Site Collection A

The Old Way

Site Collection B

Search

Search Crawl

Content Query Web Part (CBQ)

Site Collection B

Page 6: Integrating Search Driven Content in SharePoint 2013

@EricOverfield - pixelmill.com

Site Collection A

SearchSearch Crawl

Content Search Web Part

Site Collection B

Site Collection C

Site Collection D

List of articles/documentsRecommendationsPopular items

The SharePoint 2013 Way

Page 7: Integrating Search Driven Content in SharePoint 2013

Demo Solution: What We Want to Build…

Scenario:

Show dynamic content

Show potential buyers

a rollup of all the

available Specter

Group properties for

sale

@EricOverfield - pixelmill.com

Page 8: Integrating Search Driven Content in SharePoint 2013

@EricOverfield - pixelmill.com

Solution

Page 9: Integrating Search Driven Content in SharePoint 2013

Hold On… Important Prerequisites

Enterprise License Required

For Catalog creation and CBS

Depends on Search Indexer

@EricOverfield - pixelmill.com

Source site collection feature,

Cross-Site Collection Publishing must be

activated On-prem only – No O365 support yet

Page 10: Integrating Search Driven Content in SharePoint 2013

And Limitations

Consuming site requires restricted read access on

authoring site

Because results can be security trimmed Cross site publishing only supports pages and lists

@EricOverfield - pixelmill.com

Content assets (videos, images, etc.) need to be on

assets site

Use Suggested Content Browser Location Results based on search index freshness

Page 11: Integrating Search Driven Content in SharePoint 2013

What About Content Deployment?

Very different approach

Must be across content databases

@EricOverfield - pixelmill.com

Not based on search

May be used for similar reasons,

but apples to oranges comparison

Page 12: Integrating Search Driven Content in SharePoint 2013

Push NotificationsLet’s See a ComparisonMy Content

@EricOverfield - pixelmill.com

Store it anywhere, across site

collections,

web applications or farms

Page 13: Integrating Search Driven Content in SharePoint 2013

Create a catalog

@EricOverfield - pixelmill.com

Page 14: Integrating Search Driven Content in SharePoint 2013

Managed Properties

Configured in Central Admin or Site

Collection

Search Schema Content has to have been crawled

@EricOverfield - pixelmill.com

Another full crawl after a new managed

property

Required to surface/retrieve new content

columns

Page 15: Integrating Search Driven Content in SharePoint 2013

Push NotificationsLet’s See a ComparisonCreating Managed Properties

@EricOverfield - pixelmill.com

Page 16: Integrating Search Driven Content in SharePoint 2013

Push NotificationsLet’s See a ComparisonGetting Content from a Catalog

@EricOverfield - pixelmill.com

1

2

3

Page 17: Integrating Search Driven Content in SharePoint 2013

Push NotificationsLet’s See a ComparisonAggregate Content Review

@EricOverfield - pixelmill.com

We have source content -> catalog, stored anywhere (almost)Content has been crawled

Managed properties have been created

Prerequisites have been addressed (licenses and features)

Content has been crawled - again

Consuming site has been connected to catalog

Ready to display!

Page 18: Integrating Search Driven Content in SharePoint 2013

Content Rollup with the

Content Search Web Part

@EricOverfield - pixelmill.com

Page 19: Integrating Search Driven Content in SharePoint 2013

@EricOverfield - pixelmill.com

The Content Search Web Part

(CBS)Getting the results:

Query Builder

Showing the results: Display Templates

Page 20: Integrating Search Driven Content in SharePoint 2013

Push NotificationsLet’s See a ComparisonGet Dynamic Content with Query Builder

@EricOverfield - pixelmill.com

1

2 3

Page 21: Integrating Search Driven Content in SharePoint 2013

Push NotificationsLet’s See a ComparisonShow Dynamic Content with Display Templates

@EricOverfield - pixelmill.com

Page 22: Integrating Search Driven Content in SharePoint 2013

Customize YourDisplay

Templates!@EricOverfield - pixelmill.com

Page 23: Integrating Search Driven Content in SharePoint 2013

Push NotificationsLet’s See a ComparisonWhat Makes up a Display Template?

@EricOverfield - pixelmill.com

Control template

Item Template

HTML and JS

No more XSLT!

Retrieves Managed Properties

Page 24: Integrating Search Driven Content in SharePoint 2013

Push NotificationsLet’s See a ComparisonCustom Display Templates

@EricOverfield - pixelmill.com

Add to Master

Page Gallery

Copy from an

existing display template

Use any editor

Page 25: Integrating Search Driven Content in SharePoint 2013

Implementing Custom Display Templates

Must specify all managed properties to surface

May externalize CSS and JS that template

needs

@EricOverfield - pixelmill.com

Inline JS must appear after the first <div>

Add HTML markup to render results

Page 26: Integrating Search Driven Content in SharePoint 2013

Push NotificationsLet’s See a ComparisonA Look at the Code: Item Template

@EricOverfield - pixelmill.com

<mso:ManagedPropertyMapping msdt:dt="string"> 'LastModifiedTime':'LastModifiedTime', 'Specter Property Type'{Specter Property Type}:'SpecterPropertyType', 'Picture URL'{Picture URL}:'PublishingImage;PictureURL;PictureThumbnailURL', 'Link URL'{Link URL}:'Path', 'Line 1'{Line 1}:'Title', 'Line 2'{Line 2}:'Description', 'SecondaryFileExtension', 'ContentTypeId'</mso:ManagedPropertyMapping>

Obtain Managed Properties

Page 27: Integrating Search Driven Content in SharePoint 2013

Push NotificationsLet’s See a ComparisonA Look at the Code: Item Template

@EricOverfield - pixelmill.com

Load Managed Properties into

JavaScript Variables

var specterPropertyType = $getItemValue(ctx, "SpecterPropertyType");

var lastModifiedTime = $getItemValue(ctx, "LastModifiedTime");

Page 28: Integrating Search Driven Content in SharePoint 2013

Push NotificationsLet’s See a ComparisonA Look at the Code: Item Template

@EricOverfield - pixelmill.com

Display JavaScript Variables with

HTML Markup<span class="_#= specterPropertyType=#_"> <a href="_#= linkURL =#_" class="thumb"> _#= pictureMarkup =#_ <div class="date"> <div class="d">_#= date=#_</div> <div class="m">_#= month=#_</div> </div> </a> <div class="caption">Property Type: _#=

specterPropertyType=#_</div></span>

Page 29: Integrating Search Driven Content in SharePoint 2013

@EricOverfield - pixelmill.com

Display Components and Their

MappingsComponent Type File SharePoint Artifacts

Style for the entire result set block and for each search result item

CSS style.cssCSS file in the Master Page Gallery:

/Spectergroup/css/style.css

Structure for the entire block of results

HTML tag: <ul>

Control_List_Specter

Custom Control display template in the Master Page Gallery:

/Display Templates/Content Web Part/Control_List_Specter.html

Display content for each result item

HTML tag: <li>

Item_LargePicture_Specter

Custom Item display template in the Master Page Gallery:

/Display Templates/Content Web Part/Item_LargePicture_Specter.html

Pre-process data for each result item

JavaScriptInline JavaScript in Item_LargePicture_Specter

Custom Item display template in the Master Page Gallery:

/Display Templates/Content Web Part/Item_LargePicture_Specter.html

Page 30: Integrating Search Driven Content in SharePoint 2013

Push NotificationsLet’s See a ComparisonDisplay Templates Review

@EricOverfield - pixelmill.com

Add managed properties to top of display template

Customize with HTML, JavaScript and CSS

Copy an existing display template

Page 31: Integrating Search Driven Content in SharePoint 2013

That is SharePoint 2013

Content Rollup

in a Nutshell@EricOverfield - pixelmill.com

OK?

Page 32: Integrating Search Driven Content in SharePoint 2013

Fine Tune Search Results

and Content Rollups

@EricOverfield - pixelmill.com

Page 33: Integrating Search Driven Content in SharePoint 2013

Target IndividualResult Items!

@EricOverfield - pixelmill.com

Page 34: Integrating Search Driven Content in SharePoint 2013

Push NotificationsLet’s See a ComparisonQuick Test

@EricOverfield - pixelmill.com

Wait, what, a Test?

Find the PDF

Find Joanna’s Project

Page 35: Integrating Search Driven Content in SharePoint 2013
Page 36: Integrating Search Driven Content in SharePoint 2013

The Problem

Results all look the same

But all documents/results are not the

same

@EricOverfield - pixelmill.com

Forces us to search our results

Page 37: Integrating Search Driven Content in SharePoint 2013

Demo Solution: What We Want to Build…

Scenario:

Customize Search

Experience

When user searches for “floor

plans”

Customize floor plans result

type as best bets

Promote beachfront

properties in the summer

Page 38: Integrating Search Driven Content in SharePoint 2013

Result Types

Tailor the look of important types of

results

@EricOverfield - pixelmill.com

One of these things… is not like the other.

Page 39: Integrating Search Driven Content in SharePoint 2013

Result Types

Conditions match result properties

Identify a “type” of result

Display Templates can change the look

Of a “type” of result

@EricOverfield - pixelmill.com

Page 40: Integrating Search Driven Content in SharePoint 2013

Your Own Result Type

@EricOverfield - pixelmill.com

1

2

Page 41: Integrating Search Driven Content in SharePoint 2013

@EricOverfield - pixelmill.com

And Thus Styled

Page 42: Integrating Search Driven Content in SharePoint 2013

Query Rules

Custom results based on intent

May be created at various levels

Search Service App or Site Collection and

inherited

@EricOverfield - pixelmill.com

May be deactivate at child levels

Page 43: Integrating Search Driven Content in SharePoint 2013

Create a Query Rule

Condition: Set of conditions to match to fire

rule

Action: What to do when rule fired

@EricOverfield - pixelmill.com

Publishing: When should a rule be active

One or more conditions per rule

Six types of conditions available

One or more actions per rule

Six types of actions available

i.e. only during a certain time span

Page 44: Integrating Search Driven Content in SharePoint 2013

Your Own Query Rule

Add a Summer Promotion for Beachfront

Properties

@EricOverfield - pixelmill.com

Page 45: Integrating Search Driven Content in SharePoint 2013

@EricOverfield - pixelmill.com

Page 46: Integrating Search Driven Content in SharePoint 2013

@EricOverfield - pixelmill.com

Page 47: Integrating Search Driven Content in SharePoint 2013

@EricOverfield - pixelmill.com

And Thus Promoted

Page 48: Integrating Search Driven Content in SharePoint 2013

Push NotificationsLet’s See a ComparisonResult Types and Query Rules Review

@EricOverfield - pixelmill.com

Result Types Match Conditions to Item Display TemplatesQuery Rules Match Conditions with Actions

Page 49: Integrating Search Driven Content in SharePoint 2013

What You Did Learn

Aggregate Content Across Sitescross-site publishing feature

Create Content Rollup Solutionscustom display templates

Customize Individual Search Results

result types

Fine-tune Search Queriesquery rules

@EricOverfield - pixelmill.com

Page 50: Integrating Search Driven Content in SharePoint 2013

Resources

Configure cross-site publishing in SharePoint 2013:http://technet.microsoft.com/en-us/library/jj656774.aspx

Understanding the display template structure:

http://msdn.microsoft.com/en-us/library/jj945138.aspx#bk_DTstructure

Display template reference in SharePoint Server 2013:

http://technet.microsoft.com/en-us/library/jj944947.aspx

Administer search in SharePoint Server 2013:

http://technet.microsoft.com/en-us/library/ee792877.aspx

Connect a publishing site to a catalog:

http://technet.microsoft.com/en-us/library/jj679901.aspx

Make a query rule inactive:

http://technet.microsoft.com/en-us/library/

jj871014.aspx#BKMK_MakeInactiveCustomize search result types:

http://technet.microsoft.com/en-us/library/dn135239.aspx

Create query rules:

http://technet.microsoft.com/en-us/library/jj871014.aspx

@EricOverfield - pixelmill.com

Page 51: Integrating Search Driven Content in SharePoint 2013

Content in SharePoint 2013

Integrating Search Driven

Thank YouEric Overfield

@EricOverfieldericoverfield.com

[email protected]