S HARE P OINT 2013 S EARCH – A D EVELOPER ’ S P ERSPECTIVE Ryan McIntyre MCITP, MCPD Director,...
-
Upload
janelle-searle -
Category
Documents
-
view
216 -
download
0
Transcript of S HARE P OINT 2013 S EARCH – A D EVELOPER ’ S P ERSPECTIVE Ryan McIntyre MCITP, MCPD Director,...
![Page 1: S HARE P OINT 2013 S EARCH – A D EVELOPER ’ S P ERSPECTIVE Ryan McIntyre MCITP, MCPD Director, Portals & Collaboration.](https://reader036.fdocuments.in/reader036/viewer/2022062712/56649c855503460f9493bb16/html5/thumbnails/1.jpg)
SHAREPOINT 2013 SEARCH – A DEVELOPER’S PERSPECTIVE
Ryan McIntyre
MCITP, MCPD
Director, Portals & Collaboration
![Page 2: S HARE P OINT 2013 S EARCH – A D EVELOPER ’ S P ERSPECTIVE Ryan McIntyre MCITP, MCPD Director, Portals & Collaboration.](https://reader036.fdocuments.in/reader036/viewer/2022062712/56649c855503460f9493bb16/html5/thumbnails/2.jpg)
• SharePoint 2013 Search Overview– Changes from 2010
• Search Solutions• OOTB Web Parts Review• API
– Server side
– Client side
LEAVE NOW…OR…
![Page 3: S HARE P OINT 2013 S EARCH – A D EVELOPER ’ S P ERSPECTIVE Ryan McIntyre MCITP, MCPD Director, Portals & Collaboration.](https://reader036.fdocuments.in/reader036/viewer/2022062712/56649c855503460f9493bb16/html5/thumbnails/3.jpg)
SCENARIOS
![Page 4: S HARE P OINT 2013 S EARCH – A D EVELOPER ’ S P ERSPECTIVE Ryan McIntyre MCITP, MCPD Director, Portals & Collaboration.](https://reader036.fdocuments.in/reader036/viewer/2022062712/56649c855503460f9493bb16/html5/thumbnails/4.jpg)
Powerful Engine
2013 SEARCH INTRO
FAST Index FS4SP 2010
Search2013
Search
![Page 5: S HARE P OINT 2013 S EARCH – A D EVELOPER ’ S P ERSPECTIVE Ryan McIntyre MCITP, MCPD Director, Portals & Collaboration.](https://reader036.fdocuments.in/reader036/viewer/2022062712/56649c855503460f9493bb16/html5/thumbnails/5.jpg)
2013 SEARCH ARCHITECTURE
HTTPFile sharesSharePointUser profilesLotus Notes DocumentumExchange foldersCustom - BCS
SharePointSP AppsDevicesNon-SP UX
SearchAdmin
Content UX
CrawlContentProcessing Index
QueryProcessing WFE
API
AnalyticsProcessing
FAST Search Index
Public API
Unit of scale/role boundary
Feeding Chain Index Core
Query Chain
Analytics Service
![Page 6: S HARE P OINT 2013 S EARCH – A D EVELOPER ’ S P ERSPECTIVE Ryan McIntyre MCITP, MCPD Director, Portals & Collaboration.](https://reader036.fdocuments.in/reader036/viewer/2022062712/56649c855503460f9493bb16/html5/thumbnails/6.jpg)
• Content Source
• Search Schema– Now available through site
administration
• Query Rule– Customization of returned results
– Captures Intent, composed of• Query Condition
• Query Action
• Publishing Options
CORE BUILDING BLOCKS
![Page 7: S HARE P OINT 2013 S EARCH – A D EVELOPER ’ S P ERSPECTIVE Ryan McIntyre MCITP, MCPD Director, Portals & Collaboration.](https://reader036.fdocuments.in/reader036/viewer/2022062712/56649c855503460f9493bb16/html5/thumbnails/7.jpg)
• Query Transforms– Web Parts (3)
– Query Rule (2)
– Result Source (1)
• Result Source– Scope +
– Federated +
• CSWP
CORE BUILDING BLOCKS
![Page 8: S HARE P OINT 2013 S EARCH – A D EVELOPER ’ S P ERSPECTIVE Ryan McIntyre MCITP, MCPD Director, Portals & Collaboration.](https://reader036.fdocuments.in/reader036/viewer/2022062712/56649c855503460f9493bb16/html5/thumbnails/8.jpg)
• Result Type– How to display types of
results
• Display Templates– CSWP
– Hover Panel
– Refiner
– Search Results
CORE BUILDING BLOCKS
![Page 9: S HARE P OINT 2013 S EARCH – A D EVELOPER ’ S P ERSPECTIVE Ryan McIntyre MCITP, MCPD Director, Portals & Collaboration.](https://reader036.fdocuments.in/reader036/viewer/2022062712/56649c855503460f9493bb16/html5/thumbnails/9.jpg)
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: S HARE P OINT 2013 S EARCH – A D EVELOPER ’ S P ERSPECTIVE Ryan McIntyre MCITP, MCPD Director, Portals & Collaboration.](https://reader036.fdocuments.in/reader036/viewer/2022062712/56649c855503460f9493bb16/html5/thumbnails/10.jpg)
EXECUTING QUERIES
![Page 11: S HARE P OINT 2013 S EARCH – A D EVELOPER ’ S P ERSPECTIVE Ryan McIntyre MCITP, MCPD Director, Portals & Collaboration.](https://reader036.fdocuments.in/reader036/viewer/2022062712/56649c855503460f9493bb16/html5/thumbnails/11.jpg)
EXECUTING QUERIES: KQL
![Page 12: S HARE P OINT 2013 S EARCH – A D EVELOPER ’ S P ERSPECTIVE Ryan McIntyre MCITP, MCPD Director, Portals & Collaboration.](https://reader036.fdocuments.in/reader036/viewer/2022062712/56649c855503460f9493bb16/html5/thumbnails/12.jpg)
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'
![Page 13: S HARE P OINT 2013 S EARCH – A D EVELOPER ’ S P ERSPECTIVE Ryan McIntyre MCITP, MCPD Director, Portals & Collaboration.](https://reader036.fdocuments.in/reader036/viewer/2022062712/56649c855503460f9493bb16/html5/thumbnails/13.jpg)
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 14: S HARE P OINT 2013 S EARCH – A D EVELOPER ’ S P ERSPECTIVE Ryan McIntyre MCITP, MCPD Director, Portals & Collaboration.](https://reader036.fdocuments.in/reader036/viewer/2022062712/56649c855503460f9493bb16/html5/thumbnails/14.jpg)
EXECUTING QUERIES: CSOMClientContext 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 15: S HARE P OINT 2013 S EARCH – A D EVELOPER ’ S P ERSPECTIVE Ryan McIntyre MCITP, MCPD Director, Portals & Collaboration.](https://reader036.fdocuments.in/reader036/viewer/2022062712/56649c855503460f9493bb16/html5/thumbnails/15.jpg)
QUERY DEBUGGING
![Page 16: S HARE P OINT 2013 S EARCH – A D EVELOPER ’ S P ERSPECTIVE Ryan McIntyre MCITP, MCPD Director, Portals & Collaboration.](https://reader036.fdocuments.in/reader036/viewer/2022062712/56649c855503460f9493bb16/html5/thumbnails/16.jpg)
CSWP & DISPLAY TEMPLATE DEPLOYMENT
![Page 17: S HARE P OINT 2013 S EARCH – A D EVELOPER ’ S P ERSPECTIVE Ryan McIntyre MCITP, MCPD Director, Portals & Collaboration.](https://reader036.fdocuments.in/reader036/viewer/2022062712/56649c855503460f9493bb16/html5/thumbnails/17.jpg)
• <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 18: S HARE P OINT 2013 S EARCH – A D EVELOPER ’ S P ERSPECTIVE Ryan McIntyre MCITP, MCPD Director, Portals & Collaboration.](https://reader036.fdocuments.in/reader036/viewer/2022062712/56649c855503460f9493bb16/html5/thumbnails/18.jpg)
• 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 19: S HARE P OINT 2013 S EARCH – A D EVELOPER ’ S P ERSPECTIVE Ryan McIntyre MCITP, MCPD Director, Portals & Collaboration.](https://reader036.fdocuments.in/reader036/viewer/2022062712/56649c855503460f9493bb16/html5/thumbnails/19.jpg)
DEPLOYMENT DEMO
![Page 20: S HARE P OINT 2013 S EARCH – A D EVELOPER ’ S P ERSPECTIVE Ryan McIntyre MCITP, MCPD Director, Portals & Collaboration.](https://reader036.fdocuments.in/reader036/viewer/2022062712/56649c855503460f9493bb16/html5/thumbnails/20.jpg)
SCENARIOS
![Page 21: S HARE P OINT 2013 S EARCH – A D EVELOPER ’ S P ERSPECTIVE Ryan McIntyre MCITP, MCPD Director, Portals & Collaboration.](https://reader036.fdocuments.in/reader036/viewer/2022062712/56649c855503460f9493bb16/html5/thumbnails/21.jpg)
Ryan McIntyre
http://blog.randomdust.com
@ryanmcintyre
303-520-6337
![Page 22: S HARE P OINT 2013 S EARCH – A D EVELOPER ’ S P ERSPECTIVE Ryan McIntyre MCITP, MCPD Director, Portals & Collaboration.](https://reader036.fdocuments.in/reader036/viewer/2022062712/56649c855503460f9493bb16/html5/thumbnails/22.jpg)
• http://sp2013searchtool.codeplex.com/
RESOURCES