SlideShare a Scribd company logo
Writing Code to interact with Enterprise SearchCorey RothBlog: www.dotnetmafia.comTwitter: twitter.com/coreyroth
Corey RothConsultant for StonebridgeWorked in Consumer Electronics, Travel, Advertising, and Energy industriesCurrently doing MOSS development specializing in Enterprise SearchMicrosoft Award for Customer Excellence (ACE) WinnerMCTS: MOSS 2007 ConfiguringE-mail: corey.roth@gmail.comTwitter: twitter.com/coreyrothBlog: www.dotnetmafia.com (mirrored on sharepointblogs.com)
What is Enterprise Search?Enterprise Search is one of Microsoft’s current offerings to do search in the EnterpriseIncluded in MOSS 2007Also available as a stand alone product (Search Server 2008 / Search Server Express)Allows for indexing and querying of documents from multiple sources (i.e.: documents, web sites, file shares, Active Directory (people), databases, web services, etc.)
Interacting with SearchSearch CenterQuery StringRSSKeywordQuery ClassFullTextSqlQuery ClassWeb Service
Keyword Query SyntaxUsed to search by Managed PropertiesCan specify Scopes (Scope:”MyScope”)Does not support wildcard searchAND implied between each keyword (i.e.: Color:”Red” Size:”M” is the same Color=“Red” AND Size=“M”)OR implied when multiple keywords of the same managed property used (i.e.: Color:”Red” Color:”Blue” translates to Color=“Red” OR Color=“Blue”)Can Specify Content Sources (ContentSource:”My Source”IsDocument:”1” – Query Documents Only
URL SyntaxSearch Center and RSS pages accept queries via the query stringUses the keyword syntax specified on the K parameter (i.e.: results.aspx?k=Accounting)Can specify scope using the S parameter (i.e.: results.aspx?k=Account&s=Corporate Documents)Results can be paged with the start parameter
KeywordQuery ClassSharePoint API class to execute a query using Keyword SyntaxReturns a ResultsTableCollection object which can be converted to a DataTableCan only be used on the SharePoint serverUses the credentials of the application executing the code (i.e.: the user who ran a console application, or the application pool account)SelectProperties can be used to add custom managed properties.  You must add all default properties as well as your own custom properties if this is used.
Full Text SQL SyntaxT-SQL style method of querying Enterprise SearchCan be used to do a wildcard searchSpecify columns in SELECT statement SELECT Title, Path, Write, Rank,…Always FROM Scope()Note syntax when using WHERE with a ScopeWHERE “Scope” = ‘File Share’CONTAINS predicate supports wildcard search, FREETEXT does notORDER BY clause can be used for orderingSee Office Server SDK for more information
Web ServicesLocated on your SharePoint server in the _vti_bin virtual folder/_vti_bin/search.asmx – Enterprise Search web service/vti_bin/spsearch.asmx – WSS3 Search web serviceBoth use the same syntaxWeb Service requires authenticationSpecify using .Credentials propertyRequires an input XML stringQuery method returns an XML stringQueryEx method returns a DataSet
Query Request SchemaCan use Keyword Query syntax or Full Text SQL Query syntaxQueryText element contains the querytype=“STRING” – Keyword Querytype=“MSSQLFT” – Full Text SQL QueryRange / StartAt/ Count elements can be used for pagingProperties element can be used to specify custom managed properties when using Keyword Query syntaxSortByProperties element sorts keyword queriesNote the casing of everything
RSSCan use the URL syntax with the RSS page at http://<moss-server>/<SearchCenterUrl>/_layouts/srchrss.aspxReturns an XML document in RSS format containing search resultsWill not return custom managed properties
Questions?Corey RothBlog: www.dotnetmafia.comTwitter: twitter.com/coreyroth

More Related Content

PPTX
Introduction To Enterprise Search Tulsa Tech Fest 2009
PPTX
Advanced BCS - Business Data Connectivity Models and Custom Connectors
PPTX
SharePoint 2010 Development for ASP.NET Developers - SharePoint Saturday Hous...
PPTX
SharePoint Development For Asp Net Developers
PPTX
Building business applications using business connectivity services using sha...
PPTX
Connecting to LOB Systems Using BCS, Ayman El-Hattab, MVP
PDF
SPUnite17 External Sharing in SharePoint Online
PPTX
Azure for IaaS - Global Windows Azure Bootcamp (GWAB)
Introduction To Enterprise Search Tulsa Tech Fest 2009
Advanced BCS - Business Data Connectivity Models and Custom Connectors
SharePoint 2010 Development for ASP.NET Developers - SharePoint Saturday Hous...
SharePoint Development For Asp Net Developers
Building business applications using business connectivity services using sha...
Connecting to LOB Systems Using BCS, Ayman El-Hattab, MVP
SPUnite17 External Sharing in SharePoint Online
Azure for IaaS - Global Windows Azure Bootcamp (GWAB)

What's hot (20)

PPT
Microsoft Sharepoint Technologies Demo
PDF
SPUnite17 5 More Query Rules
PPTX
Advanced BCS - Business Data Connectivity Models and Custom Connectors - SPTe...
PPTX
Business Connectivity Services With Share Point 2010
PPTX
Integrate External Data with bcs #spsaustx
PDF
Microsoft Enterprise Search
PPT
Share Point Voice Annotation
PPTX
SharePoint Saturday Dayton 2012
PPT
Optimila sharepoint superoffice integration
PPT
Windows Server 2008 for Developers - Part 1
PDF
Enterprise Content Management with SharePoint 2013 from Atidan
PPTX
Instant ECM with SharePoint 2010 - SPTechCon Boston 2011
PPTX
Modern Workplace Conference 2022 - Paris Microsoft Information Protection Dem...
PPT
Microsoft Office Sharepoint Server
PPTX
SharePoint Fest Denver - SharePoint 2010 Integration and Interoperability: Wh...
PPTX
Best Practices Integration And Interoperability
PPTX
Encryption in Microsoft 365 - session for CollabDays UK - Bletchley Park
PDF
Rits Brown Bag - Salesforce Lightning External Connection
PPTX
SPT 101 - Office 365 and Hybrid Solutions
PPTX
Jonathan Ralton - Trusting Your KM & ECM Strategy To SharePoint
Microsoft Sharepoint Technologies Demo
SPUnite17 5 More Query Rules
Advanced BCS - Business Data Connectivity Models and Custom Connectors - SPTe...
Business Connectivity Services With Share Point 2010
Integrate External Data with bcs #spsaustx
Microsoft Enterprise Search
Share Point Voice Annotation
SharePoint Saturday Dayton 2012
Optimila sharepoint superoffice integration
Windows Server 2008 for Developers - Part 1
Enterprise Content Management with SharePoint 2013 from Atidan
Instant ECM with SharePoint 2010 - SPTechCon Boston 2011
Modern Workplace Conference 2022 - Paris Microsoft Information Protection Dem...
Microsoft Office Sharepoint Server
SharePoint Fest Denver - SharePoint 2010 Integration and Interoperability: Wh...
Best Practices Integration And Interoperability
Encryption in Microsoft 365 - session for CollabDays UK - Bletchley Park
Rits Brown Bag - Salesforce Lightning External Connection
SPT 101 - Office 365 and Hybrid Solutions
Jonathan Ralton - Trusting Your KM & ECM Strategy To SharePoint
Ad

Similar to Writing Code To Interact With Enterprise Search (20)

PPT
Search overview
PPT
Microsoft Enterprise Seach using SharePoint
PPTX
TSPUG: Content Management in SharePoint 2010
PPTX
Getting the most ouf of SharePoint Search - Tulsa SharePoint Interest Group
PDF
Beyond simple search – adding business value in the enterprise
PPT
Easy Learning Presentation Moss 2007 Usman
PPT
Easy Learning Presentation Moss 2007 Usman
PPTX
SPSBOS15 - Must Love Term Sets: The New and Improved Managed Metadata Service...
PPTX
SPSCT15 - Must Love Term Sets: The New and Improved Managed Metadata Service ...
PDF
Secrets of Enterprise Data Mining 201310
PPT
business data catalog - Sharepoint Portal Server 2007
PPTX
Introduction To Enterprise Search - OKCSUG 2010
PPTX
Summer '16 Realease notes
PPTX
Spsvb Developer Intro to SharePoint Search
PPTX
Spsvb Developer Intro to SharePoint Search
PPTX
SPSNYC14 - Must Love Term Sets: The New and Improved Managed Metadata Service...
PDF
PPTX
How do i connect to that
PPTX
SharePoint Connections Coast to Coast Overview of Enterprise Content Management
PPTX
Exam 70-489 Developing Microsoft SharePoint Server 2013 Advanced Solutions Le...
Search overview
Microsoft Enterprise Seach using SharePoint
TSPUG: Content Management in SharePoint 2010
Getting the most ouf of SharePoint Search - Tulsa SharePoint Interest Group
Beyond simple search – adding business value in the enterprise
Easy Learning Presentation Moss 2007 Usman
Easy Learning Presentation Moss 2007 Usman
SPSBOS15 - Must Love Term Sets: The New and Improved Managed Metadata Service...
SPSCT15 - Must Love Term Sets: The New and Improved Managed Metadata Service ...
Secrets of Enterprise Data Mining 201310
business data catalog - Sharepoint Portal Server 2007
Introduction To Enterprise Search - OKCSUG 2010
Summer '16 Realease notes
Spsvb Developer Intro to SharePoint Search
Spsvb Developer Intro to SharePoint Search
SPSNYC14 - Must Love Term Sets: The New and Improved Managed Metadata Service...
How do i connect to that
SharePoint Connections Coast to Coast Overview of Enterprise Content Management
Exam 70-489 Developing Microsoft SharePoint Server 2013 Advanced Solutions Le...
Ad

More from Corey Roth (20)

PPTX
Introduction to Microsoft Teams and Office 365 Groups
PPTX
Compliance and eDiscovery with Office 365
PPTX
Surfacing Your External Data using BCS in SharePoint 2013 - Dev Connections 2013
PPTX
Office 365 - Introduction to SharePoint Online Development - SharePoint Conne...
POTX
Configuring SharePoint Search for an Optimal Document Management Experience
PPTX
Fives ways to query SharePoint 2013 Search - SharePoint Summit Toronto 2013
PPTX
Publishing SharePoint 2013 Apps to the Office Store - Austin SharePoint Users...
PPTX
What you need to know about Search in SharePoint 2013 Preview - DFW SharePoin...
PPTX
Office 365 - Introduction to SharePoint Online Development - Lync and Learn
PPTX
New SharePoint development features using Visual Studio 2012 - SharePoint Sat...
PPTX
Pitching Office 365 to your Energy Customers - Microsoft Worldwide Partner Co...
PPTX
Making the Most of Search in SharePoint Online - TechEd North America
PPTX
New SharePoint development features using Visual Studio 11 - San Antonio Shar...
PPTX
Office 365 - Introduction to SharePoint Online Development - SharePoint Satur...
PPTX
Extending SharePoint 2010 to your customers and partners
PPTX
Instant ECM with SharePoint 2010
PPTX
SharePoint 2010 Development for ASP.NET Developers - Tyson Devcon 2010
PPTX
Introduction to SharePoint 2010 Enterprise Search - NWA TechFest 2010
PPTX
Power shell basics in sharepoint 2010 - SharePoint Saturday Houston 2010
PPTX
Introduction to LINQ To XML
Introduction to Microsoft Teams and Office 365 Groups
Compliance and eDiscovery with Office 365
Surfacing Your External Data using BCS in SharePoint 2013 - Dev Connections 2013
Office 365 - Introduction to SharePoint Online Development - SharePoint Conne...
Configuring SharePoint Search for an Optimal Document Management Experience
Fives ways to query SharePoint 2013 Search - SharePoint Summit Toronto 2013
Publishing SharePoint 2013 Apps to the Office Store - Austin SharePoint Users...
What you need to know about Search in SharePoint 2013 Preview - DFW SharePoin...
Office 365 - Introduction to SharePoint Online Development - Lync and Learn
New SharePoint development features using Visual Studio 2012 - SharePoint Sat...
Pitching Office 365 to your Energy Customers - Microsoft Worldwide Partner Co...
Making the Most of Search in SharePoint Online - TechEd North America
New SharePoint development features using Visual Studio 11 - San Antonio Shar...
Office 365 - Introduction to SharePoint Online Development - SharePoint Satur...
Extending SharePoint 2010 to your customers and partners
Instant ECM with SharePoint 2010
SharePoint 2010 Development for ASP.NET Developers - Tyson Devcon 2010
Introduction to SharePoint 2010 Enterprise Search - NWA TechFest 2010
Power shell basics in sharepoint 2010 - SharePoint Saturday Houston 2010
Introduction to LINQ To XML

Recently uploaded (20)

PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PDF
Machine learning based COVID-19 study performance prediction
PDF
Spectral efficient network and resource selection model in 5G networks
DOCX
The AUB Centre for AI in Media Proposal.docx
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PPTX
Programs and apps: productivity, graphics, security and other tools
PPTX
Big Data Technologies - Introduction.pptx
PDF
Empathic Computing: Creating Shared Understanding
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PDF
KodekX | Application Modernization Development
PDF
MIND Revenue Release Quarter 2 2025 Press Release
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PDF
Encapsulation_ Review paper, used for researhc scholars
Per capita expenditure prediction using model stacking based on satellite ima...
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
Digital-Transformation-Roadmap-for-Companies.pptx
Machine learning based COVID-19 study performance prediction
Spectral efficient network and resource selection model in 5G networks
The AUB Centre for AI in Media Proposal.docx
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
Programs and apps: productivity, graphics, security and other tools
Big Data Technologies - Introduction.pptx
Empathic Computing: Creating Shared Understanding
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
Building Integrated photovoltaic BIPV_UPV.pdf
KodekX | Application Modernization Development
MIND Revenue Release Quarter 2 2025 Press Release
Chapter 3 Spatial Domain Image Processing.pdf
Dropbox Q2 2025 Financial Results & Investor Presentation
Advanced methodologies resolving dimensionality complications for autism neur...
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
Encapsulation_ Review paper, used for researhc scholars

Writing Code To Interact With Enterprise Search

  • 1. Writing Code to interact with Enterprise SearchCorey RothBlog: www.dotnetmafia.comTwitter: twitter.com/coreyroth
  • 2. Corey RothConsultant for StonebridgeWorked in Consumer Electronics, Travel, Advertising, and Energy industriesCurrently doing MOSS development specializing in Enterprise SearchMicrosoft Award for Customer Excellence (ACE) WinnerMCTS: MOSS 2007 ConfiguringE-mail: corey.roth@gmail.comTwitter: twitter.com/coreyrothBlog: www.dotnetmafia.com (mirrored on sharepointblogs.com)
  • 3. What is Enterprise Search?Enterprise Search is one of Microsoft’s current offerings to do search in the EnterpriseIncluded in MOSS 2007Also available as a stand alone product (Search Server 2008 / Search Server Express)Allows for indexing and querying of documents from multiple sources (i.e.: documents, web sites, file shares, Active Directory (people), databases, web services, etc.)
  • 4. Interacting with SearchSearch CenterQuery StringRSSKeywordQuery ClassFullTextSqlQuery ClassWeb Service
  • 5. Keyword Query SyntaxUsed to search by Managed PropertiesCan specify Scopes (Scope:”MyScope”)Does not support wildcard searchAND implied between each keyword (i.e.: Color:”Red” Size:”M” is the same Color=“Red” AND Size=“M”)OR implied when multiple keywords of the same managed property used (i.e.: Color:”Red” Color:”Blue” translates to Color=“Red” OR Color=“Blue”)Can Specify Content Sources (ContentSource:”My Source”IsDocument:”1” – Query Documents Only
  • 6. URL SyntaxSearch Center and RSS pages accept queries via the query stringUses the keyword syntax specified on the K parameter (i.e.: results.aspx?k=Accounting)Can specify scope using the S parameter (i.e.: results.aspx?k=Account&s=Corporate Documents)Results can be paged with the start parameter
  • 7. KeywordQuery ClassSharePoint API class to execute a query using Keyword SyntaxReturns a ResultsTableCollection object which can be converted to a DataTableCan only be used on the SharePoint serverUses the credentials of the application executing the code (i.e.: the user who ran a console application, or the application pool account)SelectProperties can be used to add custom managed properties. You must add all default properties as well as your own custom properties if this is used.
  • 8. Full Text SQL SyntaxT-SQL style method of querying Enterprise SearchCan be used to do a wildcard searchSpecify columns in SELECT statement SELECT Title, Path, Write, Rank,…Always FROM Scope()Note syntax when using WHERE with a ScopeWHERE “Scope” = ‘File Share’CONTAINS predicate supports wildcard search, FREETEXT does notORDER BY clause can be used for orderingSee Office Server SDK for more information
  • 9. Web ServicesLocated on your SharePoint server in the _vti_bin virtual folder/_vti_bin/search.asmx – Enterprise Search web service/vti_bin/spsearch.asmx – WSS3 Search web serviceBoth use the same syntaxWeb Service requires authenticationSpecify using .Credentials propertyRequires an input XML stringQuery method returns an XML stringQueryEx method returns a DataSet
  • 10. Query Request SchemaCan use Keyword Query syntax or Full Text SQL Query syntaxQueryText element contains the querytype=“STRING” – Keyword Querytype=“MSSQLFT” – Full Text SQL QueryRange / StartAt/ Count elements can be used for pagingProperties element can be used to specify custom managed properties when using Keyword Query syntaxSortByProperties element sorts keyword queriesNote the casing of everything
  • 11. RSSCan use the URL syntax with the RSS page at http://<moss-server>/<SearchCenterUrl>/_layouts/srchrss.aspxReturns an XML document in RSS format containing search resultsWill not return custom managed properties

Editor's Notes

  • #6: Demo Keyword Query Syntax in Search Center
  • #7: Demo query string syntax and RSS
  • #8: Demo KeywordQuery class along with how to specify managed properties.
  • #9: Demonstrate FullTextSqlQuery class.