Handy Reference: Default Results from KeywordQuery Search

When you invoke the Execute() method on a KeywordQuery, you can create a ResultTable based on ResultType.RelevantResults.  This code snippet illustrates what I mean:

ResultTableCollection resultsTableCollection = myKeywordQuery.Execute();

ResultTable searchResultsTable = resultsTableCollection[ResultType.RelevantResults];

The resulting table will have the following columns of information: 

WorkId
Rank
Title
Author
Size
Path
Description
Write
SiteName
CollapsingStatus
HitHighlightedSummary
HitHighlightedProperties
ContentClass
IsDocument
PictureThumbnailURL
ServerRedirectedURL

I derived this list from a SharePoint 2010 environment, enterprise edition.  Hopefully it will be handy to someone in future.

</end>

Subscribe to my blog.

Follow me on Twitter at http://www.twitter.com/pagalvin

One thought on “Handy Reference: Default Results from KeywordQuery Search

  1. Pingback: One Cause for “The creator of this fault did not specify a Reason.” « Paul Galvin's SharePoint Space

Leave a Reply

Your email address will not be published. Required fields are marked *