dev11 sharepoint search extensibility mike fitzmaurice senior technical product manager microsoft...

39

Upload: kaley-eline

Post on 16-Dec-2015

218 views

Category:

Documents


2 download

TRANSCRIPT

Page 1: DEV11 SharePoint Search Extensibility Mike Fitzmaurice Senior Technical Product Manager Microsoft Corporation mikefitz@microsoft.com
Page 2: DEV11 SharePoint Search Extensibility Mike Fitzmaurice Senior Technical Product Manager Microsoft Corporation mikefitz@microsoft.com

DEV11SharePoint Search Extensibility 

Mike FitzmauriceSenior Technical Product ManagerMicrosoft [email protected]

Page 3: DEV11 SharePoint Search Extensibility Mike Fitzmaurice Senior Technical Product Manager Microsoft Corporation mikefitz@microsoft.com

Goals

• This is about how to:–customize the out-of-box search experience–extend the search infrastructure–use the search APIs within your own applications

• Fair warning… this is not:–a search overview session–a manageability session– focused on parsing out product features by SKU

Page 4: DEV11 SharePoint Search Extensibility Mike Fitzmaurice Senior Technical Product Manager Microsoft Corporation mikefitz@microsoft.com

Agenda

• Quick overview of how SharePoint Search works• Customizing the built-in user experience• Extending Search• Reusing Search from remote applications

Page 5: DEV11 SharePoint Search Extensibility Mike Fitzmaurice Senior Technical Product Manager Microsoft Corporation mikefitz@microsoft.com

Agenda

• Quick overview of how SharePoint Search works• Customizing the built in user experience• Extending Search• Reusing Search from remote applications

Page 6: DEV11 SharePoint Search Extensibility Mike Fitzmaurice Senior Technical Product Manager Microsoft Corporation mikefitz@microsoft.com

Goals for SharePoint Sever Search

• Multiple repositories, including business data, people• Relevance, according to enterprise rules• Security everywhere• Customizable user experience• Performance• Part of an integrated strategy

– Windows Search for the Desktop– Microsoft Office SharePoint

Server for Search– Windows SharePoint Services– Exchange Server– SQL Server

Page 7: DEV11 SharePoint Search Extensibility Mike Fitzmaurice Senior Technical Product Manager Microsoft Corporation mikefitz@microsoft.com

...

...

X

User Requests

Load Balancer

Query servers

Web front ends

...Crawling

Content databases

Indexer

Propagation of indexes

...

External content

Indexer

SharePoint Search ArchitectureSearch topology model

User Requests

Load Balancer

Web front ends

Query servers

Propagationof indexes

Content Sources

SQL Server

...

...

X

User Requests

Load Balancer

Query servers

Web front ends

...Crawling

Content databases

Indexer

Propagation of indexes

...

External content

...

...

X

User Requests

Load Balancer

Query servers

Web front ends

...Crawling

Content databases

Indexer

Propagation of indexes

...

External content

...

...

X

User Requests

Load Balancer

Query servers

Web front ends

...Crawling

Content databases

Indexer

Propagation of indexes

...

External content

Index Files

Crawling

Property Store

Page 8: DEV11 SharePoint Search Extensibility Mike Fitzmaurice Senior Technical Product Manager Microsoft Corporation mikefitz@microsoft.com

Keep these concepts in mind…

• Content sources– OOB support for Web Content, NTFS File Shares, Exchange

Public Folders, Lotus Notes Databases, SharePoint Content, SharePoint profiles, Business Data Catalog

– More repositories can be accessed using custom protocol handlers

• Scopes– Used to create logical slices of the corpus– Scopes can span multiple content sources– Scope by Property, Site, Content Source, URL

• Properties

Page 9: DEV11 SharePoint Search Extensibility Mike Fitzmaurice Senior Technical Product Manager Microsoft Corporation mikefitz@microsoft.com
Page 10: DEV11 SharePoint Search Extensibility Mike Fitzmaurice Senior Technical Product Manager Microsoft Corporation mikefitz@microsoft.com

End User Experience

• Search Center– Clean UI, Search Site Template, Web Parts

• New Search Syntax– Implicit AND, Property Search, +/-, Advanced Search

• New Results Features– Query Correction, Duplicate Collapsing, Hit Highlighting, Best

Bets, Auto Definitions

• Improved Alerting and Search RSS Feeds• Security Trimmed Results

Page 11: DEV11 SharePoint Search Extensibility Mike Fitzmaurice Senior Technical Product Manager Microsoft Corporation mikefitz@microsoft.com

Agenda

• Quick overview of how SharePoint Search works• Customizing the built-in user experience• Extending Search• Reusing Search from remote applications

Page 12: DEV11 SharePoint Search Extensibility Mike Fitzmaurice Senior Technical Product Manager Microsoft Corporation mikefitz@microsoft.com

CoreResults

MatchingKeywordsAndBest Bets

HighConfidence

ActionLinks

SearchTabs

Search Center

Search Box

PaginationStatistics

Page 13: DEV11 SharePoint Search Extensibility Mike Fitzmaurice Senior Technical Product Manager Microsoft Corporation mikefitz@microsoft.com

Search Tabs

• 2 tabs are provided out of the box– All Sites tab (standard scope)– People tab

• You can add more– Custom tabs can be added for additional data types /

custom search experience– Consists of a layout page and a results page

• Not available in Search SKU

Page 14: DEV11 SharePoint Search Extensibility Mike Fitzmaurice Senior Technical Product Manager Microsoft Corporation mikefitz@microsoft.com

Search Web Parts

• 9 OOB web parts including – Search Box– Core Results– Action Links– Share data through hidden object

• Web part properties such as– Formatting– Stemming– # of results returned – XSLT

Page 15: DEV11 SharePoint Search Extensibility Mike Fitzmaurice Senior Technical Product Manager Microsoft Corporation mikefitz@microsoft.com

Customize UI With XSLT

• Appropriate for scenarios requiring– Change results layout, look and feel– Pivoting using the keyword syntax

• Web Part property• Power of XSLT

– Formatting– Logic – Math

Page 16: DEV11 SharePoint Search Extensibility Mike Fitzmaurice Senior Technical Product Manager Microsoft Corporation mikefitz@microsoft.com
Page 17: DEV11 SharePoint Search Extensibility Mike Fitzmaurice Senior Technical Product Manager Microsoft Corporation mikefitz@microsoft.com

Recap of Options

• Add/Remove/Change Tabs• Add/Remove OOB Web Parts• Change Web Part Properties

– Change XSLT

• Adding Custom Web Parts– OOB Web Parts use sealed hidden object

• You can’t add new Web Parts that depend on it, nor can you replace one of ours with one of yours

• You *can* replace all of them with a set of your own Web Parts

– You *can* use URL request parameters we pass between pages

Page 18: DEV11 SharePoint Search Extensibility Mike Fitzmaurice Senior Technical Product Manager Microsoft Corporation mikefitz@microsoft.com

Agenda

• Quick overview of how SharePoint Search works• Customizing the built-in user experience• Extending Search• Reusing Search from remote applications

Page 19: DEV11 SharePoint Search Extensibility Mike Fitzmaurice Senior Technical Product Manager Microsoft Corporation mikefitz@microsoft.com

Extending Search

• Customizing the Query and Results– Query Object Model

• Customizing the Index– Index custom data - Protocol Handlers, IFilters, BDC– Custom Query Time Security Trimmer

Page 20: DEV11 SharePoint Search Extensibility Mike Fitzmaurice Senior Technical Product Manager Microsoft Corporation mikefitz@microsoft.com

Query Object Model

• Use query OM– To build custom search UI web parts– To have direct access to query and results properties– To invoke custom queries

• 2 types of query syntaxes– Keyword– SQL

• URL Request Parameters

Page 21: DEV11 SharePoint Search Extensibility Mike Fitzmaurice Senior Technical Product Manager Microsoft Corporation mikefitz@microsoft.com

• Use Case– End user– Leverage customization

• Simple and easy to use– Avoids parsing and construction of SQL– Required and excluded term support

• Bike –fitness • SharePoint search -authur:”Richard Riley”

– Filter by any string or integer property• Consistent property:value syntax across Office, Windows and Live

search• http://msdn2.microsoft.com/en-us/library/ms497636.aspx

Query SyntaxKeyword Syntax

gallery hinges –brass site:http//supportdesk scope:Products

Page 22: DEV11 SharePoint Search Extensibility Mike Fitzmaurice Senior Technical Product Manager Microsoft Corporation mikefitz@microsoft.com

Use CaseAdvanced search solutionsComplex queries

Consistent SQL across enterprise and desktop

Query SyntaxSQL Syntax

SELECT URL, Title, DescriptionFROM portal_content..SCOPE()WHERE FREETEXT(‘gallery hinges’)AND SITE = “http://supportdesk”AND SCOPE = “Products”AND NOT CONTAINS(‘brass’)

Page 23: DEV11 SharePoint Search Extensibility Mike Fitzmaurice Senior Technical Product Manager Microsoft Corporation mikefitz@microsoft.com

Full strength, complete coverage– freetext()– Arbitrary groupings for AND, OR, NOT– CONTAINS()– LIKE– ORDER BY ASC | DESC– Removed in MOSS 2007

• UNION ALL • MATCHES• SELECT *• COALESCE TABLE  

• http://msdn2.microsoft.com/en-us/library/ms493660.aspx

Query SyntaxSQL Syntax

Page 24: DEV11 SharePoint Search Extensibility Mike Fitzmaurice Senior Technical Product Manager Microsoft Corporation mikefitz@microsoft.com

• Use Case– Launching a URL in custom application– Save searches

• Content– results.aspx?k=fish

• Scopes– results.aspx?k=fish&s=BBC

• Sort– results.aspx?v=date – results.aspx?v=relevance

• Page– results.aspx?start=21

Query SyntaxURL Request Parameters

Page 25: DEV11 SharePoint Search Extensibility Mike Fitzmaurice Senior Technical Product Manager Microsoft Corporation mikefitz@microsoft.com

Query Object ModelFeatures

• Managed code API• Single request – multiple results

Result Types• Relevant results• High confidence results• Special terms• Definitions

Optional parameters• # of Sentences in Summary• Implicit - AND/OR• Number of results• Ignore noise words• Enable stemming• Language

Page 26: DEV11 SharePoint Search Extensibility Mike Fitzmaurice Senior Technical Product Manager Microsoft Corporation mikefitz@microsoft.com

SharePoint Search Query Model

Query Engine

Query Engine

DefinitionsResultTable- IDataReader

Relevance

High Confidence

Best Bets

Query Object Model & Web Service

Keyword syntax SQL Syntax

Query

Client Application

Browser or ClientResults UI

Page 27: DEV11 SharePoint Search Extensibility Mike Fitzmaurice Senior Technical Product Manager Microsoft Corporation mikefitz@microsoft.com

• Same flow, keyword or SQL syntax– Set up query text and options– Execute()– Retrieve a set of IDataReader objects

Query Object Model

Page 28: DEV11 SharePoint Search Extensibility Mike Fitzmaurice Senior Technical Product Manager Microsoft Corporation mikefitz@microsoft.com
Page 29: DEV11 SharePoint Search Extensibility Mike Fitzmaurice Senior Technical Product Manager Microsoft Corporation mikefitz@microsoft.com

Indexing Custom Data

• Expose data as HTML/XML via HTTP• Develop a Protocol Handler to gather data from custom

repositories– Connects to a content source and enumerates the

documents– Ships with support for

• Web Content, NTFS File Shares, Exchange Public Folders, Lotus Notes Databases, SharePoint Content, SharePoint profiles, Business Data Catalog

– Interfaces are the same as in SPS 2003– MSDN: ISearchProtocol and IUrlAccessor– New registry path:

• Register PH under HKLM\Software\Microsoft\Office Server\12.0\Search\Setup\ProtocolHandlers

• http://msdn.microsoft.com/library//spssdk/html/_introduction_to_a_protocol_handler.asp

Page 30: DEV11 SharePoint Search Extensibility Mike Fitzmaurice Senior Technical Product Manager Microsoft Corporation mikefitz@microsoft.com

Indexing Custom Data

• Develop IFilter for custom file formats–Reads a document and extracts the plain text

content and properties for the indexer to index–Support reading from streams

Page 31: DEV11 SharePoint Search Extensibility Mike Fitzmaurice Senior Technical Product Manager Microsoft Corporation mikefitz@microsoft.com

Business Data SearchIndexing Structured Data Without Custom Code

• Highest integration without writing code• Information in LOB systems is often hard to access• MOSS 2007 can bring that data to your users

– Data is accessed through the Business Data Catalog– Exposed to many features in SharePoint

• Once a web service or a relational data source was registered with the BDC, search can easily index the data– No need to write code– Highly customizable results– Integrated with scopes and search center

Page 32: DEV11 SharePoint Search Extensibility Mike Fitzmaurice Senior Technical Product Manager Microsoft Corporation mikefitz@microsoft.com

Security

• Query-time security trimming (Same as SPS 2003)– File shares, WSS/SPS 2003, Exchange, Lotus Notes

(via mapping)

• Support for custom security trimming– ISecurityTrimmer interface

• Microsoft.Office.Server.Search.Query namespace– Implement Initialize() and CheckAccess()– Add the custom security trimmer assembly to the GAC– Register the security trimmer using stsadm command

Page 33: DEV11 SharePoint Search Extensibility Mike Fitzmaurice Senior Technical Product Manager Microsoft Corporation mikefitz@microsoft.com
Page 34: DEV11 SharePoint Search Extensibility Mike Fitzmaurice Senior Technical Product Manager Microsoft Corporation mikefitz@microsoft.com

Agenda

• Quick overview of how SharePoint Search works• Customizing the built in user experience• Extending Search• Reusing Search from remote applications

Page 35: DEV11 SharePoint Search Extensibility Mike Fitzmaurice Senior Technical Product Manager Microsoft Corporation mikefitz@microsoft.com

Query Web Service• Use Case

– Remote application • ASP.NET 2.0, .NET CF, or any other app…

– Office Research Pane– Windows Search

• Similar features as query object model• Results in XML and data table formats• http://o12server/_vti_bin/search.asmx• http://msdn2.microsoft.com/en-us/library/ms559279.aspx

Page 36: DEV11 SharePoint Search Extensibility Mike Fitzmaurice Senior Technical Product Manager Microsoft Corporation mikefitz@microsoft.com

Query Web Service• Methods

– Query – returns results as XML format• Research and Reference Service-

compatible XML• Use in the Office Research pane

– QueryEx – • Returns .NET DataSet• Full set of result types, features

– GetSearchMetaData – Retrieve available properties and scopes

– Registration– Status

Page 37: DEV11 SharePoint Search Extensibility Mike Fitzmaurice Senior Technical Product Manager Microsoft Corporation mikefitz@microsoft.com
Page 38: DEV11 SharePoint Search Extensibility Mike Fitzmaurice Senior Technical Product Manager Microsoft Corporation mikefitz@microsoft.com

Summary / Call to Action

• The user interface is easily customized to achieve a different look and feel

• It’s easy to extend search to develop custom applications, local or remote

• You can plug in just about any data source• Get out there and have at it

Page 39: DEV11 SharePoint Search Extensibility Mike Fitzmaurice Senior Technical Product Manager Microsoft Corporation mikefitz@microsoft.com

Additional Information

• SharePoint Team Blog– http://blogs.msdn.com/sharepoint

• SharePoint Server 2007 Developer Portal– http://msdn.microsoft.com/office/sharepoint

• Product information– http://www.microsoft.com/sharepoint