spssv integrating search driven content in sharepoint 2013

34

Upload: rita-zhang

Post on 21-May-2015

1.120 views

Category:

Technology


2 download

DESCRIPTION

Integrating Search Driven Content in SharePoint 2013 One of the most common requirements for business websites is to aggregate and display content such as news and events, recent updates, or popular content. In this session, we will utilize new SharePoint 2013 features to perform content aggregation and roll-ups. We will demonstrate how to get content from multiple sites by using the new SharePoint 2013 cross-site publishing feature. Then we will create a content roll-up solution by creating custom display templates for SharePoint's Content Search web part. Last, we will look at how to fine tune search queries and customize the display of results in search. We will demonstrate how to use Query Rules and Result Types to improve the search experience.

TRANSCRIPT

Page 1: Spssv Integrating Search Driven Content in SharePoint 2013
Page 2: Spssv Integrating Search Driven Content in SharePoint 2013

Integrating Search Driven Content in SharePoint 2013

RITA ZHANGERIC OVERFIELD

Page 3: Spssv Integrating Search Driven Content in SharePoint 2013

About Us Founder and SharePoint

Branding/UI Lead, PixelMill

Speaker, Teacher, Advocate

Author, SharePoint

Community Organizer

Sr. Consultant, Microsoft

Founder and Architect,

SP.me

Author

“Pro SharePoint 2013 Branding and

Responsive Web Development” (Apress – June

2013)

ericoverfield.com

@EricOverfield

blogs.msdn.com/ritazh

@SharePointRita

Page 4: Spssv Integrating Search Driven Content in SharePoint 2013

You will learn how to…Aggregate content from different sites

cross-site publishing feature

Create a content rollup solutioncustom display templates

Fine-tune search queries and customize the display of search results

query rules and result types

1

2

3

Page 5: Spssv Integrating Search Driven Content in SharePoint 2013

What we want to build… Scenario: Show dynamic content

Show potential buyers a rollup of all the available Specter Group properties for sale

Page 6: Spssv Integrating Search Driven Content in SharePoint 2013

Site Collection A

SearchSearch Crawl

Content Search Web Part

Site Collection B

Site Collection C

Site Collection D

List of articles/documentsRecommendationsPopular items

Page 7: Spssv Integrating Search Driven Content in SharePoint 2013

Solution

Page 8: Spssv Integrating Search Driven Content in SharePoint 2013

My Content

Page 9: Spssv Integrating Search Driven Content in SharePoint 2013

Enable Catalog

Page 10: Spssv Integrating Search Driven Content in SharePoint 2013

Create Managed Property1. After you crawl the

content

2. Create a new Managed property from a crawled property

Page 11: Spssv Integrating Search Driven Content in SharePoint 2013

Getting Content from Catalog1

2

3

Page 12: Spssv Integrating Search Driven Content in SharePoint 2013

Content Rollup with Content Search Web Part

Getting the results: Query Builder

Showing the results: Display Templates

Page 13: Spssv Integrating Search Driven Content in SharePoint 2013

Get Dynamic Content with Query Builder

1

2 3

Page 14: Spssv Integrating Search Driven Content in SharePoint 2013

Show Results with Display Templates

Page 15: Spssv Integrating Search Driven Content in SharePoint 2013

Your own display templates

1.Place them in the Master Page Gallery

2.Copy one of the existing ones for best results

3.Use the editor of your choice

Page 16: Spssv Integrating Search Driven Content in SharePoint 2013

What makes up a display template

• Retrieve managed properties• HTML and JavaScript instead

of XSL

Page 17: Spssv Integrating Search Driven Content in SharePoint 2013

Let’s look at the code…<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>

<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>

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

Page 18: Spssv Integrating Search Driven Content in SharePoint 2013

SummaryCustom display templates

1. Copied an existing display template

2. Added a new display slot for a new managed property

3. Customized the display of results with css and JavaScript

Page 19: Spssv Integrating Search Driven Content in SharePoint 2013

Design Components and Mappings in SharePoint

Component 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

JavaScript Inline JavaScript in Item_LargePicture_Specter

Custom Item display template in the Master Page Gallery:/Display Templates/Content Web Part/Item_LargePicture_Specter.html

Page 20: Spssv Integrating Search Driven Content in SharePoint 2013

Quick test…raise your hand when you’re done

Ready?

Page 21: Spssv Integrating Search Driven Content in SharePoint 2013

Find the PDF

Now find Joanna’s project

Page 22: Spssv Integrating Search Driven Content in SharePoint 2013

What’s the problem? Results all look the same All the documents and sites are not the same

We’re forced to search between results

Page 23: Spssv Integrating Search Driven Content in SharePoint 2013

What we want to build… Scenario: Customized search experience

When users search for "floor plans“: Promote beachfront properties in the summer Promote floor plans result type as best bets

Page 24: Spssv Integrating Search Driven Content in SharePoint 2013

Create a Query Rule1. Condition: Set of conditions to match for this

rule to fire2. Action: What to do when this rule is applied3. Publishing: When should the rule be active

Page 25: Spssv Integrating Search Driven Content in SharePoint 2013

Your own Query RuleAdd a Summer Promotion for Beachfront Properties

1 2 3

Page 26: Spssv Integrating Search Driven Content in SharePoint 2013

Result TypesTailor the look of important types of results.

One of these things…is not like the other.

Conditions match result properties to identify a “type” of result.

A Display Template changes the look of that type of result.

Page 27: Spssv Integrating Search Driven Content in SharePoint 2013

Your own Result Type1

2

Page 28: Spssv Integrating Search Driven Content in SharePoint 2013

SummaryQuery Rule and Result Type

1. Created a Query Rule to Add a Summer Promotion for Beachfront Properties

2. Added a Result Type for Floor Plans to Use Best Bet Item Display Templates

Page 29: Spssv Integrating Search Driven Content in SharePoint 2013

You have learned how to…Aggregate content from different sites

cross-site publishing feature

Create a content rollup solutioncustom display templates

Fine-tune search queries and customize the display of search results

query rules and result types

1

2

3

Page 30: Spssv Integrating Search Driven Content in SharePoint 2013

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

Connect a publishing site to a catalog: http://technet.microsoft.com/en-us/library/jj679901.aspx

Administer search in SharePoint Server 2013: http://technet.microsoft.com/en-us/library/ee792877.aspx

Display template reference in SharePoint Server 2013: http://technet.microsoft.com/en-us/library/jj944947.aspx

Understanding the display template structure: http://msdn.microsoft.com/en-us/library/jj945138.aspx#bk_DTstructure

Make a query rule inactive: http://technet.microsoft.com/en-us/library/jj871014.aspx#BKMK_MakeInactive

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

Customize search result types: http://technet.microsoft.com/en-us/library/dn135239.aspx

Page 31: Spssv Integrating Search Driven Content in SharePoint 2013

Integrating Search Driven Content in SharePoint 2013

Thank You

Page 32: Spssv Integrating Search Driven Content in SharePoint 2013

Thank You to Our Sponsors

Page 33: Spssv Integrating Search Driven Content in SharePoint 2013

Join us right after the event at the Firehouse Grill! Socialize and unwind after our day of learning.

1765 E. Bayshore RoadEast Palo Alto, CA

Don’t Forget SharePint

Thank you for joining us Today!

Page 34: Spssv Integrating Search Driven Content in SharePoint 2013