1 / 12

Introduction to the Search Query Object Model

Introduction to the Search Query Object Model. Alonso Robles Solutions Architect speakTECH http ://www.speaktech.com http://blogs.importchaos.com/alonsorobles. Agenda. Introduction Enterprise Search Architecture in Microsoft® Office SharePoint® Server 2007 Search Syntax Options

ina
Download Presentation

Introduction to the Search Query Object Model

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Introduction to the Search Query Object Model Alonso RoblesSolutions Architect speakTECH http://www.speaktech.com http://blogs.importchaos.com/alonsorobles

  2. Agenda • Introduction • Enterprise Search Architecture in Microsoft® Office SharePoint® Server 2007 • Search Syntax Options • Key Classes of Search Query Object Model • Demonstration • Additional Resources

  3. Introduction • Who is Alonso Robles? • Solutions Architect @ speakTECH • Microsoft® Gold Certified Partner • http://www.speaktech.com • Microsoft Certified Technology Specialist • 5+ years professional software development experience • 8+ years professional information technology experience

  4. Enterprise Search Architecture

  5. Search Syntax Options • Keyword syntax • Search terms are passed directly to the Enterprise Search service) • SQL syntax • Extension of SQL for querying databases • URL syntax • Search parameters are encoded in a URL and posted directly to a search page

  6. Keyword Syntax • Keywords • Words • Example: weather • Phrases • Example: “los angeles” • Prefixes • Example: +“los angles” -weather • Property filters • Managed properties • Example: author:John • Scopes • Example: scope:“Marketing Content” • Collapsed results • Example: duplicate:http://<displayUrl>

  7. SQL Syntax • Overview • SELECT <columns> FROM <content source> WHERE <conditions>ORDER BY <columns> • Example • SELECT rank, title, path, author FROM Scope() WHERE CONTAINS(title,'SharePoint') and "scope"='Marketing' • More information • http://msdn.microsoft.com/en-us/library/ms493660.aspx

  8. Search Query Object Model • IMPORTANT NOTES BEFORE WE BEGIN • Enterprise Search Query Object Model and Web Service both support keyword and SQL syntax search queries • Use the object model when custom code will be executed locally to the SharePoint installation • Example: Custom enterprise search web part • Use the web service when custom code will be executed on a remote computer • Example: Custom enterprise search client

  9. Enterprise Search Query Classes • Query • Designed to the base implementation class for the Enterprise Search Query object model classes. • Do not use in custom code • KeywordQuery • Provides methods and properties to execute keyword syntax based queries • FullTextSqlQuery • Provides methods and properties to execute SQL syntax based queries

  10. Common Query Class Properties • EnableStemming property • Specifies whether word stemming is enabled • Property only applies to search terms specified in the FREETEXT predicate for the • QueryText property • ResultTypes property • Specifies the search result type • Types: Definition, high confidence, relevant, special term result • TrimDuplicates property • Specifies whether duplicate items should be removed from the search results

  11. Demonstration • Enough talk… let’s walk the walk.

  12. Additional Resources • Web Resources • Alonso Robles Blog: http://blogs.importchaos.com/alonsorobles • Enterprise Search Architecture:http://msdn.microsoft.com/en-us/library/ms570748.aspx • Enterprise Search Query Object Model Overview: http://msdn.microsoft.com/en-us/library/ms544561.aspx • Enterprise Search Keyword Syntax Reference: http://msdn.microsoft.com/en-us/library/ms497636.aspx • Enterprise Search SQL Syntax Reference: http://msdn.microsoft.com/en-us/library/ms493660.aspx • Building Custom Enterprise Search Web Parts: http://msdn.microsoft.com/en-us/library/ms584220.aspx • Book Resources • Inside Microsoft® Office SharePoint® Server 2007 (Patrick Tisseghem): http://www.microsoft.com/mspress/books/10472.aspx

More Related