Ryan McIntyre MCITP MCPD Director Portals amp Collaboration SharePoint 2013 Search Overview Changes from 2010 Search Solutions OOTB Web Parts Review API Server side Client side Leave NowOr ID: 383864
Download Presentation The PPT/PDF document "SharePoint 2013 Search – A Developer..." is the property of its rightful owner. Permission is granted to download and print the materials on this web site for personal, non-commercial use only, and to display it on your personal computer provided you do not modify the materials and that you retain all copyright notices contained in the materials. By downloading content from our website, you accept the terms of this agreement.
Slide1
SharePoint 2013 Search – A Developer’s Perspective
Ryan
McIntyre
MCITP
, MCPD
Director
, Portals & CollaborationSlide2
SharePoint 2013 Search Overview
Changes from 2010
Search SolutionsOOTB Web Parts ReviewAPIServer sideClient side
Leave Now…Or…Slide3
ScenariosSlide4
Powerful Engine
2013 Search IntroSlide5
2013 Search Architecture
HTTP
File shares
SharePoint
User profiles
Lotus Notes
Documentum
Exchange folders
Custom - BCS
SharePoint
SP Apps
DevicesNon-SP UX
SearchAdmin
Content
UX
Crawl
Content
Processing
Index
Query
Processing
WFE
API
Analytics
Processing
FAST Search Index
Public API
Unit of scale/role boundary
Feeding
Chain
Index Core
Query Chain
Analytics ServiceSlide6
Content Source
Search Schema
Now available through site administrationQuery RuleCustomization of returned resultsCaptures Intent, composed ofQuery ConditionQuery Action
Publishing
Options
Core Building BlocksSlide7
Query Transforms
Web Parts (3)
Query Rule (2)Result Source (1)Result SourceScope +Federated +CSWP
Core Building BlocksSlide8
Result Type
How to display types of results
Display TemplatesCSWPHover PanelRefinerSearch Results
Core Building BlocksSlide9
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 that
Personal Query History – what did you find before?
Refiners – used for faceted navigationSlide10
Executing QueriesSlide11
Executing Queries: KQLSlide12
Executing Queries: REST
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
'Slide13
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>Slide14
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();Slide15
Query DebuggingSlide16
CSWP & Display Template DeploymentSlide17
<cringe>Design in UI</cringe>
Export
Visual Studio solutionCreate “host” pageAdd markup for CSWP from exportProperly escape ‘{‘, ‘}’, and quotes in DataProviderJSON property
CSWP Development & DeploymentSlide18
Create HTML file and verify results in UI
Export JS
Visual Studio solutionInclude JSDeploy 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 & DeploymentSlide19
Deployment DemoSlide20
ScenariosSlide21
Ryan McIntyre
ryan.mcintyre@neudesic.com
http://blog.randomdust.com@ryanmcintyre303-520-6337Slide22
http://sp2013searchtool.codeplex.com/
Resources