Developing FAST Queries - SPSATL

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

description

Introduction to using the

Transcript of Developing FAST Queries - SPSATL

Page 1: Developing FAST Queries - SPSATL

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

Developing FAST Queries

Page 2: Developing FAST Queries - SPSATL

2 |SharePoint Saturday Atlanta2 |SharePoint Saturday Atlanta

Please thank our sponsors!Platinum Sponsors

Akamai ApexIntelline

t

KnowledgeLake,

Inc.

Northridge

SharePoint

Engine Slalom Vizit

Page 3: Developing FAST Queries - SPSATL

3 |SharePoint Saturday Atlanta3 |SharePoint Saturday Atlanta

Please thank our sponsors! Gold Sponsors

ASPE, Inc

AvePoint

Axceler

B2B Technologi

es

Medseek

Metalogix

Quest Softwar

e RDA

Arke System

s

BitWizards

Page 4: Developing FAST Queries - SPSATL

4 |SharePoint Saturday Atlanta4 |SharePoint Saturday Atlanta

Please thank our sponsors! Silver Sponsors

KodakPentalogic

Technologies

Page 5: Developing FAST Queries - SPSATL

5 |SharePoint Saturday Atlanta5 |SharePoint Saturday Atlanta

Please thank our sponsors!Item & Event Sponsors

Speaker Shirts Attendee Shirts

Abel Solutions

NUMEROUS

TO COUNT!TOO

Page 6: Developing FAST Queries - SPSATL

Twitter Contests!

Mention @SPS_ATL & #SPSATL You MUST Mention a speaker OR a sponsor

to qualify Special Photo Caption contest at lunch You must be present to win!Drive your own popularity – mention your Twitter handle

Win prizes for best tweets!

Multiple prizes

each session! Session Prizes

1 Starbucks - 4 $25 gift cards

2 MSFT Store – 2 $50 gift cards

Lunch Kindle Fire!

3 Best Buy – 2 $50 gift cards

4 Amazon.com – 4 $50 gift cards

5 iTunes – 4 $50 gift cards

GRAND PRIZE: XBOX + KINECT

RU

LES

Page 7: Developing FAST Queries - SPSATL

7 |SharePoint Saturday Atlanta7 |SharePoint Saturday Atlanta

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

1996 Raleigh-Durham, NC Area since 1998 Working with SharePoint since 2002

Page 8: Developing FAST Queries - SPSATL

8 |SharePoint Saturday Atlanta8 |SharePoint Saturday Atlanta

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

Page 9: Developing FAST Queries - SPSATL

Developing FAST Queries

Concepts and Capabilities

Page 10: Developing FAST Queries - SPSATL

10 |SharePoint Saturday Atlanta

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 11: Developing FAST Queries - SPSATL

11 |SharePoint Saturday Atlanta

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 12: Developing FAST Queries - SPSATL

12 |SharePoint Saturday Atlanta12 |SharePoint Saturday Atlanta

Customization Ideas Dynamic Content Based On User’s

Audience/Properties News Rollups Dynamic Site Directory Related Content

Page 13: Developing FAST Queries - SPSATL

Developing FAST Queries

Object Model Overview

Page 14: Developing FAST Queries - SPSATL

14 |SharePoint Saturday Atlanta

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 15: Developing FAST Queries - SPSATL

15 |SharePoint Saturday Atlanta

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 16: Developing FAST Queries - SPSATL

16 |SharePoint Saturday Atlanta

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 17: Developing FAST Queries - SPSATL

Developing FAST Queries

Intro to FAST Query Lang

Page 18: Developing FAST Queries - SPSATL

18 |SharePoint Saturday Atlanta

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 19: Developing FAST Queries - SPSATL

19 |SharePoint Saturday Atlanta

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 20: Developing FAST Queries - SPSATL

20 |SharePoint Saturday Atlanta

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 21: Developing FAST Queries - SPSATL

21 |SharePoint Saturday Atlanta

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 22: Developing FAST Queries - SPSATL

22 |SharePoint Saturday Atlanta

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 23: Developing FAST Queries - SPSATL

23 |SharePoint Saturday Atlanta

Demo

Screenshot here

Page 24: Developing FAST Queries - SPSATL

Developing FAST Queries

Closeout

Page 25: Developing FAST Queries - SPSATL

25 |SharePoint Saturday Atlanta25 |SharePoint Saturday Atlanta

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

customizations Start porting existing customizations to

FQL

Page 26: Developing FAST Queries - SPSATL

26 |SharePoint Saturday Atlanta26 |SharePoint Saturday Atlanta

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 27: Developing FAST Queries - SPSATL

27 |SharePoint Saturday Atlanta27 |SharePoint Saturday Atlanta

Questions? Any questions?

Page 28: Developing FAST Queries - SPSATL

Twitter Contests!

Mention @SPS_ATL & #SPSATL You MUST Mention a speaker OR a sponsor

to qualify Special Photo Caption contest at lunch You must be present to win!Drive your own popularity – mention your Twitter handle

Win prizes for best tweets!

Multiple prizes

each session! Session Prizes

1 Starbucks - 4 $25 gift cards

2 MSFT Store – 2 $50 gift cards

Lunch Kindle Fire!

3 Best Buy – 2 $50 gift cards

4 Amazon.com – 4 $50 gift cards

5 iTunes – 4 $50 gift cards

GRAND PRIZE: XBOX + KINECT

RU

LES

Page 29: Developing FAST Queries - SPSATL

Contact Info Blog:

http://mikeoryszak.com Twitter: @next_connect Email:

[email protected]

If you tweet please remember to use the #SPSATL hashtag

Please scan the QR code and fill out the session survey for a chance at a prize

Communication and Feedback

Fill out surveys for big prizes SCAN QR CODES

https://www.surveymonkey.com/s/S8P6HDM