Presentation is loading. Please wait.

Presentation is loading. Please wait.

Microsoft ® Official Course Interacting with the Search Service Microsoft SharePoint 2013 SharePoint Practice.

Similar presentations


Presentation on theme: "Microsoft ® Official Course Interacting with the Search Service Microsoft SharePoint 2013 SharePoint Practice."— Presentation transcript:

1 Microsoft ® Official Course Interacting with the Search Service Microsoft SharePoint 2013 SharePoint Practice

2 Module Overview Understanding the SharePoint 2013 Search Service Building Search Queries with KQL and FQL Executing Search Queries from Code

3 Lesson 1: Understanding the SharePoint 2013 Search Service Search Architecture Demonstration: Exploring the Search Architecture The Search Index Crawled Properties Managed Properties Demonstration: Exploring Crawl and Managed Properties Search Schema Demonstration: Exploring the Search Schema

4 Search Architecture SharePoint Architecture has six roles Administration Crawling Content Processing Analytics Processing Query Processing Index Core services are run in following processes NodeRunner.exe HostControllerService.exe Mssmdm.exe

5 Demonstration: Exploring the Search Architecture In this demonstration your instructor will demonstrate the Search Architecture and the search index

6 Demonstration: Exploring the Search Architecture

7 The Search Index Search index resides on the file system Broken into partitions for improved performance Default Security Link Usage People Redundancy provided by creating index partitions and replicas Similar to columns and rows in FAST Search

8 Crawled Properties Crawl property is data about an item from its content source or within the item Example: A metadata column in a list (source) The createdate from the filesystem (source) The title from a word document (item) Crawl properties are retrieved from the crawler and the content processing components Crawl properties are grouped into categories

9 Managed Properties Managed properties are single or aggregated crawl properties that are configured for specific search purposes Mapped order matters for single value properties Only managed properties are included in search index Example: Crawl property name is not user friendly Multiple crawl properties from different sources need to be mapped to same managed property Can be used as a refiner Can be searchable

10 Demonstration: Exploring Crawl and Managed Properties In this demonstration your instructor will explore crawled and managed properties

11 Demonstration: Exploring Crawl and Managed Properties

12 Search Schema SharePoint Search Schema defines several search configuration specific details Result Sources Result Types Managed Properties 2013 Search Schema is multi-leveled Service Application Site Collection Site Allows customizations that are appropriate for each level’s use cases

13 Demonstration: Exploring the Search Schema

14

15 Lesson 2: Building Search Queries with KQL and FQL SharePoint Query Languages Keyword Query Language (KQL) Queries KQL Operators Advanced KQL FAST Query Language (FQL) Queries

16 SharePoint Query Languages SharePoint supports two types of query languages Keyword Query Language (KQL) FAST Query Language (FQL) KQL is the default query language FQL must be enabled manually SQL Syntax (FullTextSqlQuery) queries no longer supported Any older applications will break when moving to SharePoint 2013

17 Keyword Query Language (KQL) Queries KQL queries can be up to 2048 characters Programmatically you can increase this limit Simple keyword queries are run against the full text index They are not case sensitive Includes any crawled property with the Include in full- text index checked Phrases are designated with double quotes (“SharePoint”)

18 KQL Operators KQL allows the use of various operators to allow advanced query capabilities Queries with no operator specified are implicitly AND operators Available operators include Wildcard Comparison (, =,<>) Contains (:) Proximity (NEAR, ONEAR) Ranking (XRANK) Synonym (WORDS) All operators are case sensitive and must be in uppercase

19 Advanced KQL Simple keyword searches tend to present two common issues Never any results Too many results Advanced queries resolve this

20 FAST Query Language (FQL) Queries FAST Query Language (FQL) is a developer’s search query language Originally part of FAST Search engine Syntax has changed slightly from 2010 Disabled by default, must be enabled in code and on a result source Use KeywordQuery.EnableFQL property Three main elements Token expressions Property specification Operators

21 Lesson 3: Executing Search Queries from Code Search APIs Executing Web Service Queries Executing Server-Side Queries Demonstration: Server Side Object Model Executing Client Side Queries Demonstration: Client Side Object Model Executing Representational state transfer (REST) Queries Demonstration: Executing FQL Queries

22 Search APIs There are several ways to submit a query to SharePoint Search User Interface (UI) Web Services Server Object Model Client Side Object Model REST Based on industry standards Web services, HTTP, REST,.NET Easily integrate search into legacy applications

23 Executing Web Service Queries Web Services are deprecated in 2013 Still work, but you should migrate to different API Uses the /_vti_bin/spsearch.asmx end point Query and QueryEx methods require a specially xml formatted query parameter

24 Executing Server-Side Queries Server side object model must be run on a SharePoint server Must be run in x64 application Use KeywordQuery class to build queries Execute method is deprecated Use new SearchExecutor class to execute single and multiple queries

25 Demonstration: Server Side Object Model In this demonstration your instructor will demonstrate how to make search server side object model calls

26 Executing Client Side Queries Client side object model is a.NET API that can run from any.NET client App does not have to run on SharePoint server Calls are proxied to the server side object model Similar to Server Side, use the KeywordQuery class to construct queries SearchExecutor class is also used to send multiple queries at once Results are returned in a ResultTableCollection Iterate through all ResultTable objects to get the full result set (Promoted Results, Main Results) QueryAsUserIgnoreAppPrincipal permission scope

27 Demonstration: Client Side Object Model In this demonstration your instructor will show you how to make client-side service object model

28 Executing Representational state transfer (REST) Queries Representation state transfer (REST) is a simple HTTP based protocol GET, POST, MERGE REST Search requests utilizes the http://server/_api/search/query end point Result format can be in XML or JSON Based on Accept header Application/atom+xml Application/json REST Query Suggestions requests utilize the http://server/_api/search/suggest end point Helpful for autocomplete controls

29 Demonstration: Executing FQL Queries In this demonstration your instructor will demonstrate how to execute FAST Query Language (FQL) queries

30 Demonstration: Executing FQL Queries

31 Lab: Executing Search Queries from SharePoint Apps Exercise 1: Submitting Search Queries from Client- Side Code Exercise 2: Using a Custom Action to Launch A Search App

32 Lab Scenario The management team at Contoso is concerned about the proliferation of duplicate content across the new intranet portal. The team wants to provide a way for users to check, given a particular document, whether similar content exists elsewhere on the portal. To implement this functionality, you will create an app that uses client-side search APIs to query the search index for similar content. In addition to using the client applications, they would also like to be able to find items based on metadata but without having to type the queries. They would like you to add a custom action to the menu items to redirect to the

33 Lab Scenario client app.

34 Module Review and Takeaways

35


Download ppt "Microsoft ® Official Course Interacting with the Search Service Microsoft SharePoint 2013 SharePoint Practice."

Similar presentations


Ads by Google