Windows SharePoint Services Search Keyword Syntax
Windows SharePoint Services Search Keyword Syntax

Windows SharePoint Services Search includes new keyword syntax for building keyword queries. This syntax is simpler to use than the SQL search syntax because you do not have to parse through search terms to build a SQL statement; you pass the search terms directly to the search service.

You can pass two types of terms in a Windows SharePoint Services Search keyword query:

  • Keywords (the actual query words for the search request)

  • Property filters (the property constraints for the search request)

Keywords

You can use any of the following as keywords:

  • A word (includes one or more characters without spaces or punctuation)

  • A phrase (includes two or more words together, separated by spaces, but the words must be enclosed in quotation marks)

  • A prefix (includes a part of a word, from the beginning of the word)

The following table describes the three types of keywords: simple, included, and excluded terms.

Name Definition Character Example

Simple term

Keyword with no special requirements

N/A

Weather

Included term

Keyword that must be in content items returned in search results

"+"

+sunshine

Excluded term

Keyword that must not be in content items returned in search results

"-"

-rain

See Also

Reference

Microsoft.SharePoint.Search.Query.KeywordQuery

Other Resources

Building Windows SharePoint Services Search Queries
Windows SharePoint Services Search Property Filters
Windows SharePoint Services Search Keyword Syntax Inclusion and Exclusion

Community Content

"+" is implicit on property filters
Added by:kungmidas
From "Keyword Syntax Inclusion and Exclusion" (http://msdn.microsoft.com/en-us/library/ms457908.aspx)
"By definition, property filters are included, so you do not need to use the inclusion character "+". If you do include the character with a property filter, it is ignored."
© 2010 Microsoft Corporation. All rights reserved.   Terms of Use | Trademarks | Privacy Statement
Page view tracker
Rate the Lightweight library
x
Lightweight builds on ScriptFree (loband) by adding features you've requested: a SearchBox and default code language selection.
Do you like the SearchBox?
Do you like the tabbed code blocks?
How useful is this topic?
Tell us more.
Thanks
x
You're helping to improve MSDN Online.
Feedback
Switch View
Classic
Lightweight Beta
ScriptFree
Switch View