This blog posting applies to Microsoft Office SharePoint Server 2007.
SharePoint can search for content using the values in site columns, as well as performing free text searches. The official help page that describes this is at http://msdn2.microsoft.com/en-us/library/ms476494.aspx. This posting gives some more examples of ways in which this is useful.
The names of the property filters you can use are the names of the columns on your document library or content type. One of the most useful property filters is ContentType, because with this you can search for specific types of documents; many values can be specified. There are a hierarchy of content types available, and specifying one will include all of its descendants. Here is a partial tree of the most pertinent values you can use for ContentType:
Custom document types
Search syntax does not provide Boolean operators AND & OR. But very similar functionality can be gained with the right combinations of properties. When one property is specified several times, all of the conditions are combined using OR. When different properties are specified, all of the conditions are combined using AND.
Every list item that’s an Announcement OR an Event
ContentType:"Document" Author:"Mark Arend" Status:"Not Started" Status:"Draft"
All Documents created by Mark Arend that have a status of Not Started OR Draft
ContentType:"Article Page" -Status:"Published"
All Article Pages that are NOT Published. note the dash character to negate a property filter.
Property filters provide you with a way to narrow the focus of the keyword search based on the following:
There is no maximum length for keywords property filters, however, the full length of the keyword query should be less than 1024 characters.
Keyword syntax supports querying for any properties of a string or numeric type from the full set of managed properties.
The URL property. Note:
Compound scope. Specify the friendly name of scope.
Collapsing filter. Requests duplicate items for specified URL.
If there are one or more spaces in the display name of the column you want to filter by, then you must use the internal name of the column instead. Usually, this means replacing all spaces in the name with _x0020_. For example, to filter on Issue Status, use Issue_x0020_Status. Sometimes the space is just removed; for example, to filter on Contact Type, use ContactType. In some cases neither rule applies and the internal name is different; use a tool such as an object model browser such as SharePoint Inspector (http://www.codeplex.com/spi) to find the internal name (called the Static Name) that you need to use. Here are a few common ones:
Static (internal) Name
Checked Out To
Contact E-Mail Address
Encoded Absolute URL
Scheduling End Date
Scheduling Start Date
Server Relative URL