developer fast queries (sps ny)

25
Mike Oryszak Blog: http://mikeoryszak.com Twitter: @next_connect Developing FAST Queries

Upload: mike-oryszak

Post on 25-Jan-2015

1.497 views

Category:

Technology


0 download

DESCRIPTION

Developer's introduction to FAST Query language.

TRANSCRIPT

Page 1: Developer FAST Queries (SPS NY)

Mike Oryszak Blog: http://mikeoryszak.comTwitter: @next_connect

Developing FAST Queries

Page 2: Developer FAST Queries (SPS NY)

2 |SharePoint Saturday NY

Housekeeping Please remember to turn in your filled out

bingo cards and event evaluations for prizes.

SharePint is sponsored by Summit 7 Systems across the way at the Hilton NYC.

Follow SharePoint Saturday New York City on Twitter @spsnyc and hashtag #spsnyc

Page 3: Developer FAST Queries (SPS NY)

Thanks to Our Sponsors!

Page 4: Developer FAST Queries (SPS NY)

4 |SharePoint Saturday NY

About Me Practice Manager with Intellinet Microsoft SharePoint Server MVP Dev and Architect with MS stack since

1996 Working with SharePoint since 2002 Raleigh-Durham, NC

Page 5: Developer FAST Queries (SPS NY)

5 |SharePoint Saturday NY

Session Overview Concepts and Capabilities Object Model Review Intro to Fast Query Language (FQL) Recommended Next Steps Additional Resources

Page 6: Developer FAST Queries (SPS NY)

Developing FAST Queries

Concepts and Capabilities

Page 7: Developer FAST Queries (SPS NY)

7 |SharePoint Saturday NY

Importance of Search Content Aggregation and Portability

Becoming the defacto technique Easy to access Security Trimming

Allows you to quickly and securely render dynamic content from any source/site in the index

Page 8: Developer FAST Queries (SPS NY)

8 |SharePoint Saturday NY

Advantages of FAST System Advantages

Extreme scalability of the search sub-system

Advanced crawling and ranking algorithms

Relevancy customizations

Query Advantages More complex queries Advanced sorting and

ranking options Advanced refinement

options

Page 9: Developer FAST Queries (SPS NY)

9 |SharePoint Saturday NY

Customization Ideas Dynamic Content Based On User’s

Audience/Properties News Rollups Dynamic Site Directory Related Content

Page 10: Developer FAST Queries (SPS NY)

Developing FAST Queries

Object Model Overview

Page 11: Developer FAST Queries (SPS NY)

11 |SharePoint Saturday NY

FAST versus SharePoint Search FAST Query Modes:

Keyword Queries and FQL

FullTextSQLQueries not supported

Advanced Sorting and Ranking SortByProperties

property

Find Similar Results FindSimilar property

Advanced Refinement IncludeRefinementResult

s and RefinementFilters properties

Page 12: Developer FAST Queries (SPS NY)

12 |SharePoint Saturday NY

Enterprise Search APIs Microsoft.Office.Server.Search is the core

namespace for both SharePoint Server Search and FAST for SharePoint

KeywordQuery mQuery = new KeywordQuery(searchProxy); mQuery.EnableFQL = true;mQuery.QueryText = “body:Contoso”;mQuery.ResultTypes = ResultType.RelevantResults;ResultTableCollection resultsTableCollection; resultsTableCollection = mQuery.Execute();

Page 13: Developer FAST Queries (SPS NY)

13 |SharePoint Saturday NY

People Search People Search is not performed by FAST,

but delegated to FAST Query SSA

Set the ResultsProvider property to SharePointSearch

mQuery.ResultsProvider = SearchProvider.SharepointSearch;

Page 14: Developer FAST Queries (SPS NY)

Developing FAST Queries

Intro to FAST Query Lang

Page 15: Developer FAST Queries (SPS NY)

15 |SharePoint Saturday NY

FQL Overview Definition - Query Language used to perform

precise searches and refinements on indexed content.

The length of FQL queries is limited to 2,048 characters.

Create simple or complex expressions that can identify and narrow relevant results. Token expressions - One or more query terms,

phrases, or numeric values to search for in a query Property specification - A property or full-text index

to match with the expression value Operators - Keywords that specify Boolean operators

(such as AND, OR) or other constraints to operands (such as FILTER OR RANK)

Page 16: Developer FAST Queries (SPS NY)

16 |SharePoint Saturday NY

Token Expressions Wildcard

Expressions The * is for 0 or more

characters The ? Is for 1 character

Examples Text* *text *text* Te?t *te?t

Numeric Expressions Int Float Date & Time Expressions

YYYY-MM-DD YYYY-MM-DDThh:mm:ss YYYY-MM-DDThh:mm:ssz

Page 17: Developer FAST Queries (SPS NY)

17 |SharePoint Saturday NY

Property Specification Important - Properties must be in

lowercase characters regardless of how it is specified

Examples: title:and(much, nothing) and(title:much, title:nothing) title:string("much nothing", mode="and") 

Page 18: Developer FAST Queries (SPS NY)

18 |SharePoint Saturday NY

Property Specification, cont. The following FQL query example searches

for the terms “pharmaceutical" and “testing" in the category managed property of an indexed item:

category:string(“pharmaceutical testing", mode="and") In the example:

category: limits the scope of the query to the category managed property within the item.

"pharmaceutical testing" is the operand to the STRING operator, which indicates the terms to search for.

mode="and" indicates that the logical query operator AND will be applied to "pharmaceutical testing".

Page 19: Developer FAST Queries (SPS NY)

19 |SharePoint Saturday NY

Operators Logical

And, +, Or, Any Andnot, Not, - Equals Starts-with Ends-with Max Min Range

Datatypes Int, Int32, Int64 Float, Double Datetime

Search Count Rank Xrank Scope Phrase

Page 20: Developer FAST Queries (SPS NY)

20 |SharePoint Saturday NY

Demo

Page 21: Developer FAST Queries (SPS NY)

Developing FAST Queries

Closeout

Page 22: Developer FAST Queries (SPS NY)

22 |SharePoint Saturday NY

Recommended Next Steps Experiment with FQL development Consider using FQL for any new

customizations Start porting existing customizations to

FQL

Page 23: Developer FAST Queries (SPS NY)

23 |SharePoint Saturday NY

Additional Resources MSDN FQL Reference

http://msdn.microsoft.com/en-us/library/ff394606.aspx

Querying FAST for SharePoint http://msdn.microsoft.com/en-us/library/ff394622

Content Classes in SharePoint Search http://mikeoryszak.com/2010/04/content-classes-in-sharepoint-searc

h/

FAST for SharePoint 2010 Query Tool http://fastforsharepoint.codeplex.com/

Page 24: Developer FAST Queries (SPS NY)

24 |SharePoint Saturday NY

Questions? Any questions?

Page 25: Developer FAST Queries (SPS NY)

25 |SharePoint Saturday NY

GiveawayMicrosoft SP 2010 Business Application Blueprintshttp://www.packtpub.com/microsoft-sharepoint-2010-business-application-blueprints/book