SlideShare une entreprise Scribd logo
1  sur  12
Writing Code to interact with Enterprise Search Corey Roth Blog: www.dotnetmafia.com Twitter: twitter.com/coreyroth
Corey Roth Consultant for Stonebridge Worked in Consumer Electronics, Travel, Advertising, and Energy industries Currently doing MOSS development specializing in Enterprise Search Microsoft Award for Customer Excellence (ACE) Winner MCTS: MOSS 2007 Configuring E-mail: corey.roth@gmail.com Twitter: twitter.com/coreyroth Blog: 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 Enterprise Included in MOSS 2007 Also 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 Search Search Center Query String RSS KeywordQuery Class FullTextSqlQuery Class Web Service
Keyword Query Syntax Used to search by Managed Properties Can specify Scopes (Scope:”MyScope”) Does not support wildcard search AND 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 Syntax Search Center and RSS pages accept queries via the query string Uses 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 Class SharePoint API class to execute a query using Keyword Syntax Returns a ResultsTableCollection object which can be converted to a DataTable Can only be used on the SharePoint server Uses 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 Syntax T-SQL style method of querying Enterprise Search Can be used to do a wildcard search Specify columns in SELECT statement  SELECT Title, Path, Write, Rank,… Always FROM Scope() Note syntax when using WHERE with a Scope WHERE “Scope” = ‘File Share’ CONTAINS predicate supports wildcard search, FREETEXT does not ORDER BY clause can be used for ordering See Office Server SDK for more information
Web Services Located 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 service Both use the same syntax Web Service requires authentication Specify using .Credentials property Requires an input XML string Query method returns an XML string QueryEx method returns a DataSet
Query Request Schema Can use Keyword Query syntax or Full Text SQL Query syntax QueryText element contains the query type=“STRING” – Keyword Query type=“MSSQLFT” – Full Text SQL Query Range / StartAt/ Count elements can be used for paging Properties element can be used to specify custom managed properties when using Keyword Query syntax SortByProperties element sorts keyword queries Note the casing of everything
RSS Can use the URL syntax with the RSS page at http://<moss-server>/<SearchCenterUrl>/_layouts/srchrss.aspx Returns an XML document in RSS format containing search results Will not return custom managed properties
Questions? Corey Roth Blog: www.dotnetmafia.com Twitter: twitter.com/coreyroth

Contenu connexe

Tendances

Microsoft Sharepoint Technologies Demo
Microsoft Sharepoint Technologies DemoMicrosoft Sharepoint Technologies Demo
Microsoft Sharepoint Technologies Demo
Gurudatt Kumar
 
Business Connectivity Services With Share Point 2010
Business Connectivity Services With Share Point 2010Business Connectivity Services With Share Point 2010
Business Connectivity Services With Share Point 2010
Alexander Meijers
 
Microsoft Enterprise Search
Microsoft Enterprise SearchMicrosoft Enterprise Search
Microsoft Enterprise Search
portalevent
 
Share Point Voice Annotation
Share Point   Voice AnnotationShare Point   Voice Annotation
Share Point Voice Annotation
gma13
 
Enterprise Content Management with SharePoint 2013 from Atidan
Enterprise Content Management with SharePoint 2013 from AtidanEnterprise Content Management with SharePoint 2013 from Atidan
Enterprise Content Management with SharePoint 2013 from Atidan
David J Rosenthal
 
Microsoft Office Sharepoint Server
Microsoft Office Sharepoint ServerMicrosoft Office Sharepoint Server
Microsoft Office Sharepoint Server
Nithin
 
SharePoint Fest Denver - SharePoint 2010 Integration and Interoperability: Wh...
SharePoint Fest Denver - SharePoint 2010 Integration and Interoperability: Wh...SharePoint Fest Denver - SharePoint 2010 Integration and Interoperability: Wh...
SharePoint Fest Denver - SharePoint 2010 Integration and Interoperability: Wh...
Richard Harbridge
 

Tendances (20)

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

Similaire à Writing Code To Interact With Enterprise Search

Search overview
Search overviewSearch overview
Search overview
Hiep Luong
 
Easy Learning Presentation Moss 2007 Usman
Easy Learning Presentation Moss 2007 UsmanEasy Learning Presentation Moss 2007 Usman
Easy Learning Presentation Moss 2007 Usman
Usman Zafar Malik
 
Easy Learning Presentation Moss 2007 Usman
Easy Learning Presentation Moss 2007 UsmanEasy Learning Presentation Moss 2007 Usman
Easy Learning Presentation Moss 2007 Usman
Usman Zafar Malik
 
Summer '16 Realease notes
Summer '16 Realease notesSummer '16 Realease notes
Summer '16 Realease notes
aggopal1011
 

Similaire à Writing Code To Interact With Enterprise Search (20)

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

Plus de Corey Roth

Publishing SharePoint 2013 Apps to the Office Store - Austin SharePoint Users...
Publishing SharePoint 2013 Apps to the Office Store - Austin SharePoint Users...Publishing SharePoint 2013 Apps to the Office Store - Austin SharePoint Users...
Publishing SharePoint 2013 Apps to the Office Store - Austin SharePoint Users...
Corey Roth
 

Plus de Corey Roth (20)

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

Dernier

Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 

Dernier (20)

Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 

Writing Code To Interact With Enterprise Search

  • 1. Writing Code to interact with Enterprise Search Corey Roth Blog: www.dotnetmafia.com Twitter: twitter.com/coreyroth
  • 2. Corey Roth Consultant for Stonebridge Worked in Consumer Electronics, Travel, Advertising, and Energy industries Currently doing MOSS development specializing in Enterprise Search Microsoft Award for Customer Excellence (ACE) Winner MCTS: MOSS 2007 Configuring E-mail: corey.roth@gmail.com Twitter: twitter.com/coreyroth Blog: 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 Enterprise Included in MOSS 2007 Also 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 Search Search Center Query String RSS KeywordQuery Class FullTextSqlQuery Class Web Service
  • 5. Keyword Query Syntax Used to search by Managed Properties Can specify Scopes (Scope:”MyScope”) Does not support wildcard search AND 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 Syntax Search Center and RSS pages accept queries via the query string Uses 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 Class SharePoint API class to execute a query using Keyword Syntax Returns a ResultsTableCollection object which can be converted to a DataTable Can only be used on the SharePoint server Uses 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 Syntax T-SQL style method of querying Enterprise Search Can be used to do a wildcard search Specify columns in SELECT statement SELECT Title, Path, Write, Rank,… Always FROM Scope() Note syntax when using WHERE with a Scope WHERE “Scope” = ‘File Share’ CONTAINS predicate supports wildcard search, FREETEXT does not ORDER BY clause can be used for ordering See Office Server SDK for more information
  • 9. Web Services Located 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 service Both use the same syntax Web Service requires authentication Specify using .Credentials property Requires an input XML string Query method returns an XML string QueryEx method returns a DataSet
  • 10. Query Request Schema Can use Keyword Query syntax or Full Text SQL Query syntax QueryText element contains the query type=“STRING” – Keyword Query type=“MSSQLFT” – Full Text SQL Query Range / StartAt/ Count elements can be used for paging Properties element can be used to specify custom managed properties when using Keyword Query syntax SortByProperties element sorts keyword queries Note the casing of everything
  • 11. RSS Can use the URL syntax with the RSS page at http://<moss-server>/<SearchCenterUrl>/_layouts/srchrss.aspx Returns an XML document in RSS format containing search results Will not return custom managed properties
  • 12. Questions? Corey Roth Blog: www.dotnetmafia.com Twitter: twitter.com/coreyroth

Notes de l'éditeur

  1. Demo Keyword Query Syntax in Search Center
  2. Demo query string syntax and RSS
  3. Demo KeywordQuery class along with how to specify managed properties.
  4. Demonstrate FullTextSqlQuery class.