38

True PS C:\SPC231> Start-SPEnterpriseSearchCrawlContentSource.ps1 Recipes -Wait Wednesday, November 7, 2012 8:47:08 AM Entered CrawlStarting

Embed Size (px)

Citation preview

Page 1: True PS C:\SPC231> Start-SPEnterpriseSearchCrawlContentSource.ps1 Recipes -Wait Wednesday, November 7, 2012 8:47:08 AM Entered CrawlStarting
Page 2: True PS C:\SPC231> Start-SPEnterpriseSearchCrawlContentSource.ps1 Recipes -Wait Wednesday, November 7, 2012 8:47:08 AM Entered CrawlStarting

SPC231 Step by Step:Search Development in SP2013Matthew KingSr. Con, Microsoft

SPC231

Andrew WardlyArchitect, Microsoft

Page 3: True PS C:\SPC231> Start-SPEnterpriseSearchCrawlContentSource.ps1 Recipes -Wait Wednesday, November 7, 2012 8:47:08 AM Entered CrawlStarting

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

Page 4: True PS C:\SPC231> Start-SPEnterpriseSearchCrawlContentSource.ps1 Recipes -Wait Wednesday, November 7, 2012 8:47:08 AM Entered CrawlStarting

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

Page 5: True PS C:\SPC231> Start-SPEnterpriseSearchCrawlContentSource.ps1 Recipes -Wait Wednesday, November 7, 2012 8:47:08 AM Entered CrawlStarting

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%

Page 6: True PS C:\SPC231> Start-SPEnterpriseSearchCrawlContentSource.ps1 Recipes -Wait Wednesday, November 7, 2012 8:47:08 AM Entered CrawlStarting

What lies ahead?

User ExperienceContent Acquisition

Search managementExternal content crawl via BCSContent Enrichment

Custom refinersDisplay Templates Query RulesWindows 8 UI

Page 7: True PS C:\SPC231> Start-SPEnterpriseSearchCrawlContentSource.ps1 Recipes -Wait Wednesday, November 7, 2012 8:47:08 AM Entered CrawlStarting

Demo

How it’ll look when we’re done

Page 8: True PS C:\SPC231> Start-SPEnterpriseSearchCrawlContentSource.ps1 Recipes -Wait Wednesday, November 7, 2012 8:47:08 AM Entered CrawlStarting

User ExperienceContent Acquisition

Search managementExternal content crawl via BCSContent Enrichment

Custom refinersDisplay Templates Query RulesWindows 8 UI

Page 9: True PS C:\SPC231> Start-SPEnterpriseSearchCrawlContentSource.ps1 Recipes -Wait Wednesday, November 7, 2012 8:47:08 AM Entered CrawlStarting

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>

Page 10: True PS C:\SPC231> Start-SPEnterpriseSearchCrawlContentSource.ps1 Recipes -Wait Wednesday, November 7, 2012 8:47:08 AM Entered CrawlStarting

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

Page 11: True PS C:\SPC231> Start-SPEnterpriseSearchCrawlContentSource.ps1 Recipes -Wait Wednesday, November 7, 2012 8:47:08 AM Entered CrawlStarting

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

Page 12: True PS C:\SPC231> Start-SPEnterpriseSearchCrawlContentSource.ps1 Recipes -Wait Wednesday, November 7, 2012 8:47:08 AM Entered CrawlStarting

Moving on…

User ExperienceContent Acquisition

Search managementExternal content crawl via BCSContent Enrichment

Custom refinersDisplay TemplatesQuery RulesWindows 8 UI

Page 13: True PS C:\SPC231> Start-SPEnterpriseSearchCrawlContentSource.ps1 Recipes -Wait Wednesday, November 7, 2012 8:47:08 AM Entered CrawlStarting

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

Page 14: True PS C:\SPC231> Start-SPEnterpriseSearchCrawlContentSource.ps1 Recipes -Wait Wednesday, November 7, 2012 8:47:08 AM Entered CrawlStarting

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

Page 15: True PS C:\SPC231> Start-SPEnterpriseSearchCrawlContentSource.ps1 Recipes -Wait Wednesday, November 7, 2012 8:47:08 AM Entered CrawlStarting

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.

Page 16: True PS C:\SPC231> Start-SPEnterpriseSearchCrawlContentSource.ps1 Recipes -Wait Wednesday, November 7, 2012 8:47:08 AM Entered CrawlStarting

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

Page 17: True PS C:\SPC231> Start-SPEnterpriseSearchCrawlContentSource.ps1 Recipes -Wait Wednesday, November 7, 2012 8:47:08 AM Entered CrawlStarting

User ExperienceContent Acquisition

Search managementExternal content crawl via BCSContent Enrichment

Custom refinersDisplay Templates Result Source/Query RulesWindows 8 UI

Page 18: True PS C:\SPC231> Start-SPEnterpriseSearchCrawlContentSource.ps1 Recipes -Wait Wednesday, November 7, 2012 8:47:08 AM Entered CrawlStarting

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!

Page 19: True PS C:\SPC231> Start-SPEnterpriseSearchCrawlContentSource.ps1 Recipes -Wait Wednesday, November 7, 2012 8:47:08 AM Entered CrawlStarting

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

Page 20: True PS C:\SPC231> Start-SPEnterpriseSearchCrawlContentSource.ps1 Recipes -Wait Wednesday, November 7, 2012 8:47:08 AM Entered CrawlStarting

Demo

User Experience

Page 21: True PS C:\SPC231> Start-SPEnterpriseSearchCrawlContentSource.ps1 Recipes -Wait Wednesday, November 7, 2012 8:47:08 AM Entered CrawlStarting

User ExperienceContent Acquisition

Search managementExternal content crawl via BCSContent Enrichment

Custom refinersDisplay Templates Result Source/Query RulesWindows 8 UI

Page 22: True PS C:\SPC231> Start-SPEnterpriseSearchCrawlContentSource.ps1 Recipes -Wait Wednesday, November 7, 2012 8:47:08 AM Entered CrawlStarting

Sliders: only available for integer managed propertiesDefine intervals in search schema or on page

New refiners

Slider Slider w/ Bar Graph

Multi-value

Page 23: True PS C:\SPC231> Start-SPEnterpriseSearchCrawlContentSource.ps1 Recipes -Wait Wednesday, November 7, 2012 8:47:08 AM Entered CrawlStarting

User ExperienceContent Acquisition

Search managementExternal content crawl via BCSContent Enrichment

Custom refinersDisplay Templates Query RulesWindows 8 UI

Page 24: True PS C:\SPC231> Start-SPEnterpriseSearchCrawlContentSource.ps1 Recipes -Wait Wednesday, November 7, 2012 8:47:08 AM Entered CrawlStarting

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

Page 25: True PS C:\SPC231> Start-SPEnterpriseSearchCrawlContentSource.ps1 Recipes -Wait Wednesday, November 7, 2012 8:47:08 AM Entered CrawlStarting

Hover PanelNew functionality

Customize by copying existing Item HoverPanel.html

Page 26: True PS C:\SPC231> Start-SPEnterpriseSearchCrawlContentSource.ps1 Recipes -Wait Wednesday, November 7, 2012 8:47:08 AM Entered CrawlStarting

Result TypeEach Result Type References a display template

Add new result type

Page 27: True PS C:\SPC231> Start-SPEnterpriseSearchCrawlContentSource.ps1 Recipes -Wait Wednesday, November 7, 2012 8:47:08 AM Entered CrawlStarting

Go Deeper on

Display TemplatesHover PanelsResult TypesResult Sources

Go deeper at SPC12 SPC063 - Customizing Search Experiences in SharePoint 2013

Page 28: True PS C:\SPC231> Start-SPEnterpriseSearchCrawlContentSource.ps1 Recipes -Wait Wednesday, November 7, 2012 8:47:08 AM Entered CrawlStarting

User ExperienceContent Acquisition

Search managementExternal content crawl via BCSContent Enrichment

Custom refinersDisplay Templates Query RulesWindows 8 UI

Page 29: True PS C:\SPC231> Start-SPEnterpriseSearchCrawlContentSource.ps1 Recipes -Wait Wednesday, November 7, 2012 8:47:08 AM Entered CrawlStarting

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

Page 30: True PS C:\SPC231> Start-SPEnterpriseSearchCrawlContentSource.ps1 Recipes -Wait Wednesday, November 7, 2012 8:47:08 AM Entered CrawlStarting

User ExperienceContent Acquisition

Search managementExternal content crawl via BCSContent Enrichment

Custom refinersDisplay Templates Result types and hover panelsQuery RulesWindows 8 UI

Page 31: True PS C:\SPC231> Start-SPEnterpriseSearchCrawlContentSource.ps1 Recipes -Wait Wednesday, November 7, 2012 8:47:08 AM Entered CrawlStarting

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

Page 32: True PS C:\SPC231> Start-SPEnterpriseSearchCrawlContentSource.ps1 Recipes -Wait Wednesday, November 7, 2012 8:47:08 AM Entered CrawlStarting

Demo

User Experience

Page 33: True PS C:\SPC231> Start-SPEnterpriseSearchCrawlContentSource.ps1 Recipes -Wait Wednesday, November 7, 2012 8:47:08 AM Entered CrawlStarting

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

Page 34: True PS C:\SPC231> Start-SPEnterpriseSearchCrawlContentSource.ps1 Recipes -Wait Wednesday, November 7, 2012 8:47:08 AM Entered CrawlStarting

Questions?

Page 35: True PS C:\SPC231> Start-SPEnterpriseSearchCrawlContentSource.ps1 Recipes -Wait Wednesday, November 7, 2012 8:47:08 AM Entered CrawlStarting

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

Page 36: True PS C:\SPC231> Start-SPEnterpriseSearchCrawlContentSource.ps1 Recipes -Wait Wednesday, November 7, 2012 8:47:08 AM Entered CrawlStarting

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

Page 37: True PS C:\SPC231> Start-SPEnterpriseSearchCrawlContentSource.ps1 Recipes -Wait Wednesday, November 7, 2012 8:47:08 AM Entered CrawlStarting

Evaluate this session now on MySPC using your laptop or mobile device: http://myspc.sharepointconference.com

MySPC

Page 38: True PS C:\SPC231> Start-SPEnterpriseSearchCrawlContentSource.ps1 Recipes -Wait Wednesday, November 7, 2012 8:47:08 AM Entered CrawlStarting

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