Upload
mike-oryszak
View
1.497
Download
0
Embed Size (px)
DESCRIPTION
Developer's introduction to FAST Query language.
Citation preview
Mike Oryszak Blog: http://mikeoryszak.comTwitter: @next_connect
Developing FAST Queries
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
Thanks to Our Sponsors!
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
5 |SharePoint Saturday NY
Session Overview Concepts and Capabilities Object Model Review Intro to Fast Query Language (FQL) Recommended Next Steps Additional Resources
Developing FAST Queries
Concepts and Capabilities
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
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
9 |SharePoint Saturday NY
Customization Ideas Dynamic Content Based On User’s
Audience/Properties News Rollups Dynamic Site Directory Related Content
Developing FAST Queries
Object Model Overview
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
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();
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;
Developing FAST Queries
Intro to FAST Query Lang
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)
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
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")
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".
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
20 |SharePoint Saturday NY
Demo
Developing FAST Queries
Closeout
22 |SharePoint Saturday NY
Recommended Next Steps Experiment with FQL development Consider using FQL for any new
customizations Start porting existing customizations to
FQL
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/
24 |SharePoint Saturday NY
Questions? Any questions?
25 |SharePoint Saturday NY
GiveawayMicrosoft SP 2010 Business Application Blueprintshttp://www.packtpub.com/microsoft-sharepoint-2010-business-application-blueprints/book