Export (0) Print
Expand All

Enterprise Search Keyword Syntax Inclusion and Exclusion

SharePoint 2007

When you specify the property filter in the Enterprise Search in Microsoft Office SharePoint Server 2007 keyword syntax, you must also specify whether the results that are returned should include or exclude content that matches the value specified for that property filter. You accomplish this using Office SharePoint Search keyword syntax inclusion and exclusion characters.

The following table describes the keyword syntax inclusion and exclusion characters.

Name Character Behavior

Inclusion

"+"

Include content with values that match the inclusion.

Exclusion

"-"

Exclude content with values that match the exclusion.

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. For example, the following syntax fragments behave similarly:

author:"John Smith"
+author:"John Smith"

You can use the exclusion character with a property filter to exclude results from search. This is equivalent to the NOT operator in SQL search syntax. The following syntax fragment shows the use of this character with a property filter:

-author:"John Smith"
NoteNote:

The search query must contain at least one included keyword or property filter. If the query contains only an exclusion, it fails with a QueryContainsOnlyExcludedTerms exception.

Community Additions

ADD
Show:
© 2014 Microsoft