Upload
jordan-griffin
View
217
Download
0
Tags:
Embed Size (px)
Citation preview
SPC231 Step by Step:Search Development in SP2013Matthew KingSr. Con, Microsoft
SPC231
Andrew WardlyArchitect, Microsoft
What are we here to do?Build a representative search solution
→ Crawl content from external data source
→ Enrich the content to add value to search
→ Customize the Search Center UX
→ Windows 8 application integration example
What are we here to do?Build a representative search solution
→ Crawl content from external data source
→ Enrich the content to add value to search
→ Customize the Search Center UX
→ Windows 8 application integration example
Go deeper at SPC12SPC230 - Step by Step: Building Search Driven Applications with SharePoint 2013
VS
Who are you?
Not new to SharePoint
Mix of IT Pro and Developer
Comfortable with codeLooking at XML filesWorking in Visual StudioPerforming SP tasks using PowerShell
New to search?SPC259 - What's New in Search for SharePoint 2013
DeveloperIT Pro
9%
What lies ahead?
User ExperienceContent Acquisition
Search managementExternal content crawl via BCSContent Enrichment
Custom refinersDisplay Templates Query RulesWindows 8 UI
Demo
How it’ll look when we’re done
User ExperienceContent Acquisition
Search managementExternal content crawl via BCSContent Enrichment
Custom refinersDisplay Templates Query RulesWindows 8 UI
Search managementCentral Admin is great…PowerShell is repeatableMaintain-SPEnterpriseSearchMetadataProperties.ps1
XML configuration file specifying:Managed Property definitionsCrawled Property definitionsMapping from Crawled to Managed Properties
<mproperty type="1" name="RecipeNutrients"> <property name="OverrideValueOfHasMultipleValues">True</property> <property name="Queryable">True</property> </mproperty>
Search managementCentral Admin is nice…PowerShell is repeatableMaintain-SPEnterpriseSearchMetadataProperties.ps1Start-SPEnterpriseSearchContentSource.ps1
Kick off a crawl from the command lineOptionally wait for it to finish
PS C:\SPC231> Start-SPEnterpriseSearchCrawlContentSource.ps1 Recipes -WaitWednesday, November 7, 2012 8:47:08 AM Entered CrawlStartingWednesday, November 7, 2012 8:47:29 AM Entered CrawlingFullWednesday, November 7, 2012 8:50:19 AM Entered CrawlCompletingWednesday, November 7, 2012 8:50:49 AM Entered IdleWednesday, November 7, 2012 8:50:50 AM Elapsed 0d 00:03:43.535Wednesday, November 7, 2012 8:50:50 AM Counts success=250 warning=0 error=2
Search managementCentral Admin is nice…PowerShell is repeatableMaintain-SPEnterpriseSearchMetadataProperties.ps1Start-SPEnterpriseSearchContentSource.ps1 Clear-SPEnterpriseSearchCrawlContentSource.ps1Reset-SPEnterpriseSearchServiceApplication.ps1SearchBenchmarkWithSQLIO.ps1
and more, available on TechNet in the Script Center
Moving on…
User ExperienceContent Acquisition
Search managementExternal content crawl via BCSContent Enrichment
Custom refinersDisplay TemplatesQuery RulesWindows 8 UI
What is Business Connectivity Services?Connects external data sources to SharePointCan be used as a search sourceHas several flavors
No-Code OData
SQL
Code WCF
.NET Assembly
We’re going to build a WCF service
BCS request methods
BCS YourService
Finder()
[id1,id2,id3]
SpecificFinder(id1)
[id1’s properties]
StreamAccessor(id1)
[id1’s data]
For incremental crawls: ChangedIdEnumerator and DeletedIdEnumerator used instead of Finder
Optimize BCS for searchEnable full search experienceMark the source as search enabledDocument contentsExternal URL
Plan for volumePaging resultsOnly return the data needed
Plan for changesImplement incremental crawling
→ ShowInSearchUI→ StreamAccessor→ DisplayUriField
→ Batching cookies→ Finder method only needs document ids
→ If not implemented, incremental crawl requests will just trigger a full crawl.
But there’s more…Adding Security DescriptorsClient Side Caching for small records
Go deeper at SPC12SPC044 Crawl and Index all Enterprise Content with SharePoint 2013 SearchSPC049 Custom Security Trimming for Search in SharePoint 2013 – THIS AFTERNOON @ 3:15 HOL017 BCS for SharePoint 2013HOL035 SP 2013 Search Connectors using BCS
User ExperienceContent Acquisition
Search managementExternal content crawl via BCSContent Enrichment
Custom refinersDisplay Templates Result Source/Query RulesWindows 8 UI
Content EnrichmentWeb Service callout Service lives outside of SharePointConfiguration
Go deeper at SPC12SPC203 Search Content Enrichment and Extensibility in SharePoint 2013
Endpoint URL of web service
Input properties Managed properties passed in
Output properties
Managed properties that can be returned
Include raw data?
Optionally include raw data (read only)
Debug mode Sends all input properties, ignores all output properties
Error mode Warning or Error. In Error mode, failing items are dropped
CrawlerContent
Processing Index
Web Service
No aliases!
Content Enrichment: our task
Extract metadataPull out the calorie count from the recipe nutritional info
Add new metadataLastProcessedTime managed property
Reject documentsGet rid of the BCS container items
Demo
User Experience
User ExperienceContent Acquisition
Search managementExternal content crawl via BCSContent Enrichment
Custom refinersDisplay Templates Result Source/Query RulesWindows 8 UI
Sliders: only available for integer managed propertiesDefine intervals in search schema or on page
New refiners
Slider Slider w/ Bar Graph
Multi-value
User ExperienceContent Acquisition
Search managementExternal content crawl via BCSContent Enrichment
Custom refinersDisplay Templates Query RulesWindows 8 UI
Display Templates• New to SharePoint 2013• Start with Design Manager • SharePoint Designer 2013 doesn’t support
“design view” • Map the masterpage library through
webdav • Work with HTML. . . “.js” files created
automatically
Hover PanelNew functionality
Customize by copying existing Item HoverPanel.html
Result TypeEach Result Type References a display template
Add new result type
Go Deeper on
Display TemplatesHover PanelsResult TypesResult Sources
Go deeper at SPC12 SPC063 - Customizing Search Experiences in SharePoint 2013
User ExperienceContent Acquisition
Search managementExternal content crawl via BCSContent Enrichment
Custom refinersDisplay Templates Query RulesWindows 8 UI
Result Source/Query Rules
Result Source allows us to create result blockQuery Rules Builder to set new trigger for result block
Go deeper at SPC12SPC143 - Making Great Search Based Applications with Query Rules in SharePoint 2013SPC230 - Step by Step: Building Search Driven Applications with SharePoint 2013
User ExperienceContent Acquisition
Search managementExternal content crawl via BCSContent Enrichment
Custom refinersDisplay Templates Result types and hover panelsQuery RulesWindows 8 UI
Win 8 app
Leveraging REST APIVisual Studio 2012
Must explicitly request the refiners in REST API
Go deeper at SPC12SPC 033 - Building Search-Driven Windows 8 Apps with SharePoint 2013 Search
Demo
User Experience
Search HOLs and events @ SPCHOL034 – Exploring Search Query Rules in SharePoint 2013HOL032 – Extending the Search experience in SharePoint 2013HOL035 – SharePoint Server 2013 Search Connectors and Using BCS
Meet a Search SME
Ask questions, meet the community and share knowledge!
Mon-Thu @ Exhibit Hall
Hands on Labs
Daily 10:30am-6:30pm @ HOL Lab Lounge
Ask the Experts
Discuss search!
Wed 6:15PM @ Ask the Experts Lounge
Relevancy SessionSPC145 - Optimize Search Relevance in SharePoint 2013 – TODAY @ 5pm
Questions?
ReferencesMSDNSearch in SharePoint 2013How to: Use the Content Enrichment web service callout for SharePoint ServerEnhancing the BDC model file for Search in SharePoint 2013SharePoint Dev Blog: BCSSearch Connector Framework Troubleshooting (SP 2010)
TechNetScript Center SharePoint PowerShell ScriptsCreate and deploy custom entity extractors in SharePoint Server 2013
ElsewherePeshka: Debugging Display TemplatesSP2013 Search Query Tool
EnvironmentHardware (VM)Windows Server 2012
4 CPU16 GB RAM
External SQL server
SoftwareSharePoint 2013
2 Web Applications & Search Centers (one for “final” demo, the other to build up)2 Search Service Applications (one for each web app)BCS (shared)
Visual Studio 2012 with Office toolsRemote Desktop Connection Manager
Evaluate this session now on MySPC using your laptop or mobile device: http://myspc.sharepointconference.com
MySPC
© 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries.The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.