Quantcast
Channel: FS4SP – Johnny's RIA Corner
Viewing all articles
Browse latest Browse all 2

Fast Tips for FAST for SharePoint #2

$
0
0

When trying to query for a document that has a question mark (?) in its name or address as part of a FQL query, you may notice weird behavior from FAST.


For example, let's send a query that look for a document with the URL address of http://localhost/blogs.aspx?blogid=5:


string

fqlQuery=@"and(path:(string(""http://localhost/blogs.aspx?blogid=5"", Mode=""PHRASE"")), filter(sitename:equals(""Local SharePoint"")))";Sending the query as is, will cause FAST to automatically evaluate the question mark as a wildcard character that will match any single character. Since this is not our desired result, we need to tell FAST not to use wildcards in our specific string. This can be done easily using the wildcard parameter of string. Changing the query with this parameter will look as follows and will make sure you get the desired result:

string fqlQuery = @"and(path:(string(""http://localhost/blogs.aspx?blogid=5"", Mode=""PHRASE"", wildcard=off)), filter(sitename:equals(""Local SharePoint"")))";


Viewing all articles
Browse latest Browse all 2

Trending Articles