35
SharePoint 2013 Search and Creating Dynamic Content Management Solutions Ryan McIntyre MCITP, MCPD National Architect @ryanmcintyre

SharePoint 2013 Search and Creating Dynamic Content Management Solutions

Embed Size (px)

DESCRIPTION

Presented at SharePoint TechFest Dallas 2014. All rights reserved.

Citation preview

Page 1: SharePoint 2013 Search and Creating Dynamic Content Management Solutions

SharePoint 2013 Search and Creating Dynamic Content

Management Solutions

Ryan McIntyreMCITP, MCPD

National Architect@ryanmcintyre

Page 2: SharePoint 2013 Search and Creating Dynamic Content Management Solutions

© Copyright 2014, Neudesic. All rights reserved.

• SharePoint 2013 Search Overview• Changes from 2010

• Search Solutions• OOTB Web Parts Review• API

• Server side• Client side

• Packaging & Deployment

Leave Now…Or…

Page 3: SharePoint 2013 Search and Creating Dynamic Content Management Solutions

© Copyright 2014, Neudesic. All rights reserved.

Scenarios

Page 4: SharePoint 2013 Search and Creating Dynamic Content Management Solutions

© Copyright 2014, Neudesic. All rights reserved.

Powerful Engine

2013 Search Intro

FAST Index FS4SP

2010 Search

2013 Search

Page 5: SharePoint 2013 Search and Creating Dynamic Content Management Solutions

© Copyright 2014, Neudesic. All rights reserved.

2013 Search Architecture

HTTPFile sharesSharePointUser profilesLotus Notes DocumentumExchange foldersCustom - BCS

SharePointSP AppsDevicesNon-SP UX

SearchAdmin

Content UX

Crawl

ContentProcessing Index

QueryProcessing WFE

AP

I

AnalyticsProcessing

FAST Search Index

Public API

Unit of scale/role boundary

Feeding Chain Index

CoreQuery Chain

Analytics Service

Page 6: SharePoint 2013 Search and Creating Dynamic Content Management Solutions

© Copyright 2014, Neudesic. All rights reserved.

Core Building Blocks

Content SourceSearch Schema

Now available through site administration

Query RuleCustomization of returned resultsCaptures Intent, composed of

Query ConditionQuery ActionPublishing Options

Page 7: SharePoint 2013 Search and Creating Dynamic Content Management Solutions

© Copyright 2014, Neudesic. All rights reserved.

Core Building Blocks

Query TransformsWeb Parts (3)Query Rule (2)Result Source (1)

Result SourceScope +Federated +

CSWP

Page 8: SharePoint 2013 Search and Creating Dynamic Content Management Solutions

© Copyright 2014, Neudesic. All rights reserved.

Core Building Blocks

Result TypeHow to display types of results

Display TemplatesCSWPHover PanelRefinerSearch Results

Page 9: SharePoint 2013 Search and Creating Dynamic Content Management Solutions

© Copyright 2014, Neudesic. All rights reserved.

Search Experience

Query Rules – what’s “on sale”

today?

Display Template – show an image with

a description

Result Types – when content class =

merchandise use my display template

Result Source – catalog of items

Recommendations – People who viewed this also

viewed thatPersonal Query

History – what did you find before?

Refiners – used for faceted

navigation

Page 10: SharePoint 2013 Search and Creating Dynamic Content Management Solutions

© Copyright 2014, Neudesic. All rights reserved.

Search in Action Demo

Page 11: SharePoint 2013 Search and Creating Dynamic Content Management Solutions

© Copyright 2014, Neudesic. All rights reserved.

Executing Queries

Page 12: SharePoint 2013 Search and Creating Dynamic Content Management Solutions

© Copyright 2014, Neudesic. All rights reserved.

Executing Queries: KQL

Page 13: SharePoint 2013 Search and Creating Dynamic Content Management Solutions

© Copyright 2014, Neudesic. All rights reserved.

Keywords http://server/site/_api/search/query?querytext='{KQL Query}‘

Selecting Properties http://server/site/_api/search/query?

querytext='test'&selectproperties='Title,Rank'

Sorting http://server/site/_api/search/query?

querytext='test'&sortlist='LastModifiedTime:descending' http://server/site/_api/search/query?

querytext='test'&sortlist='LastModifiedTime:descending,Rank:ascending'

Executing Queries: REST

Page 14: SharePoint 2013 Search and Creating Dynamic Content Management Solutions

© Copyright 2014, Neudesic. All rights reserved.

Executing Queries: REST

<d:RelevantResults m:type="Microsoft.Office.Server.Search.REST.RelevantResults"> <d:RowCount m:type="Edm.Int32">16</d:RowCount> <d:Rows m:type="SP.SimpleDataTable"> <d:Rows> <d:element m:type="SP.SimpleDataRow"> <d:Cells> <d:element m:type="SP.KeyValue"> <d:Key xml:space="preserve">Rank</d:Key> <d:Value xml:space="preserve">29.4688339233398</d:Value> <d:ValueType xml:space="preserve">Edm.Decimal</d:ValueType> </d:element>

Page 15: SharePoint 2013 Search and Creating Dynamic Content Management Solutions

© Copyright 2014, Neudesic. All rights reserved.

Executing Queries: CSOM

ClientContext ctx = new ClientContext("http://sharepointonline/site");

var query = new KeywordQuery(ctx, ctx.Site);query.QueryText = "Search terms";query.ResultTypes = ResultType.RelevantResults;query.Id = Guid.NewGuid();var queries = new KeywordQuery[1];queries[0] = query;SearchExecutor searchExecutor = new SearchExecutor(ctx);var rcc = searchExecutor.ExecuteQueries(queries);ctx.ExecuteQuery();

Page 16: SharePoint 2013 Search and Creating Dynamic Content Management Solutions

© Copyright 2014, Neudesic. All rights reserved.

Query Debugging

Page 17: SharePoint 2013 Search and Creating Dynamic Content Management Solutions

© Copyright 2014, Neudesic. All rights reserved.

CSWP & Display Template Deployment

Page 18: SharePoint 2013 Search and Creating Dynamic Content Management Solutions

© Copyright 2014, Neudesic. All rights reserved.

• <cringe>Design in UI</cringe>• Export• Visual Studio solution

• Create “host” page• Add markup for CSWP from export• Properly escape ‘{‘, ‘}’, and quotes in DataProviderJSON property

CSWP Development & Deployment

Page 19: SharePoint 2013 Search and Creating Dynamic Content Management Solutions

© Copyright 2014, Neudesic. All rights reserved.

• Create HTML file and verify results in UI• Export JS• Visual Studio solution

• Include JS• Deploy to “_catalogs/masterpage/Display Templates/Content Web

Parts”• {Optionally, deploy HTML (not JS) and programmatically update file

post-deployment to generate JS}

Display Template Development & Deployment

Page 20: SharePoint 2013 Search and Creating Dynamic Content Management Solutions

© Copyright 2014, Neudesic. All rights reserved.

Deployment Demo

Page 21: SharePoint 2013 Search and Creating Dynamic Content Management Solutions

© Copyright 2014, Neudesic. All rights reserved.

Scenarios

Page 22: SharePoint 2013 Search and Creating Dynamic Content Management Solutions

© Copyright 2014, Neudesic. All rights reserved.

Ryan [email protected]://blog.randomdust.com

@ryanmcintyre303-520-6337

Page 23: SharePoint 2013 Search and Creating Dynamic Content Management Solutions

© Copyright 2014, Neudesic. All rights reserved.

• http://sp2013searchtool.codeplex.com/

Resources

Page 24: SharePoint 2013 Search and Creating Dynamic Content Management Solutions

© Copyright 2014, Neudesic. All rights reserved.

Page 25: SharePoint 2013 Search and Creating Dynamic Content Management Solutions

© Copyright 2014, Neudesic. All rights reserved.

Page 26: SharePoint 2013 Search and Creating Dynamic Content Management Solutions

© Copyright 2014, Neudesic. All rights reserved.

Page 27: SharePoint 2013 Search and Creating Dynamic Content Management Solutions

© Copyright 2014, Neudesic. All rights reserved.

Page 28: SharePoint 2013 Search and Creating Dynamic Content Management Solutions

© Copyright 2014, Neudesic. All rights reserved.

Page 29: SharePoint 2013 Search and Creating Dynamic Content Management Solutions

© Copyright 2014, Neudesic. All rights reserved.

Page 30: SharePoint 2013 Search and Creating Dynamic Content Management Solutions

© Copyright 2014, Neudesic. All rights reserved.

Page 31: SharePoint 2013 Search and Creating Dynamic Content Management Solutions

© Copyright 2014, Neudesic. All rights reserved.

Page 32: SharePoint 2013 Search and Creating Dynamic Content Management Solutions

© Copyright 2014, Neudesic. All rights reserved.

Page 33: SharePoint 2013 Search and Creating Dynamic Content Management Solutions

© Copyright 2014, Neudesic. All rights reserved.

Page 34: SharePoint 2013 Search and Creating Dynamic Content Management Solutions

© Copyright 2014, Neudesic. All rights reserved.

Page 35: SharePoint 2013 Search and Creating Dynamic Content Management Solutions

© Copyright 2014, Neudesic. All rights reserved.