Managing Metadata
The Enterprise Search Administration namespace (Microsoft.Office.Server.Search.Administration) provides the ability to create code that manages properties used for Enterprise Search, for greater control over the Search Schema. Search administrators can use this namespace to do the following:
Use some search properties as scopes (this gives the user greater control over which items are included in the search results).
Easily customize the search options in the Advanced Search Web Part.
Easily migrate Search Schema settings.
Preconfigure Enterprise Search for custom metadata.
The new Enterprise Search Schema offers two types of properties: crawled and managed. These are discussed in the following sections.
Crawled Properties
Crawled properties are discovered by the search index service component when crawling content.
Note
To include a crawled property in the search experience, you must map it to a managed property. For details, see Mapping Crawled Properties to Managed Properties later in this topic.
A crawled property can be multivalued if the property has multiple values at the time it is crawled. The crawled properties are grouped by category, based on the protocol handler used.
Following are the default crawled property categories:
HTML
Lotus Notes
PDF
XML
Office
Exchange
People
Portal
SharePoint
Managed Properties
Properties that are part of the Search user experience, which means they are available for search results, advanced search, and so on, are managed properties.
By default, you can retrieve all managed properties, and you can use all managed properties that are strings for full-text query or keyword query searches. You can declare a managed property as multivalued, which means that it will contain the values from all of the crawled properties mapped to it. If a managed property is mapped to a multivalued crawled property, the managed property can be queried with multiple values from the crawled property.
Mapping Crawled Properties to Managed Properties
To make a crawled property available for the Search experience—to make it available for Search queries and display it in Advanced Search and search results—you must map it to a managed property. You can map multiple crawled properties to a single managed property or map a single crawled property to multiple managed properties. If a managed property has multiple crawled properties mapped to it, and a document contains values for more than one of the crawled properties, the order in which the properties are mapped and their priority determine the managed property’s value.
Schema Object Model
You can find the classes for managing the Search Schema in the Microsoft.Office.Server.Search.Administration namespace, located in Microsoft.Office.Server.Search.dll. The following figure shows the Search Schema object model.
Search Schema object model
By using the Microsoft.Office.Server.Search.Administration.Category class, you can configure settings for crawled property categories, as described in Table 2.
Table 2. Settings for crawled property categories
Name | Description |
---|---|
Name |
Category name. |
DiscoverNewProperties |
Indicates whether the crawler automatically discovers properties with every crawl. Default setting is true. |
MapToContents |
Indicates whether all string crawl properties are mapped to content. Default setting is true for the SharePoint category, false for all the other categories |
AllowInFullTextQuery |
Indicates whether crawled properties can be used in a CONTAINS clause when mapped to a managed property, without being recrawled. Default setting is true for string properties in all categories, false for other property types. |
By using the Microsoft.Office.Server.Search.Administration.ManagedProperty class, you can configure settings for managed properties, as described in Table 3.
Table 3. Managed property settings
Name | Description |
---|---|
EnabledForScoping |
Indicates whether the managed property is available to use for a scope. |
MappingDisallowed |
Indicates whether a crawled property can be mapped to this managed property. |
Retrievable |
Indicates whether the property can be displayed, sorted, or used with operators. |
HasMultipleValues |
Indicates whether the managed property is multivalued. |
FullTextQueriable |
Indicates whether this managed property can be used in a CONTAINS or FREETEXT clause, so that the property is specified through a query. |
NoWordBreaker |
Indicates whether the values for this managed property go through a word breaker. |
NameNormalized |
Indicates whether the property value is the name normalized. Applies to only Active Directory domain controller properties. An example of name normalization is converting a user name string to the full name for that user. |
Description |
Description specified for the managed property. |
ManagedType |
Data type for the managed property. |
Name |
Name of the managed property. |
RemoveDuplicates |
Indicates whether the managed property receives multiple values, if there are duplicates. |
Weight |
Applies to relevance configuration. |
See Also
Tasks
How to: Return the Search Context for the Search Service Provider
How to: Retrieve the Managed Properties for a Shared Services Provider
How to: Retrieve the Crawled Properties Mapped to a Managed Property
How to: Create a Managed Property
How to: Delete a Managed Property
Reference
Microsoft.Office.Server.Search.Administration.Schema
Microsoft.Office.Server.Search.Administration.ManagedProperty
Microsoft.Office.Server.Search.Administration.CrawledProperty
Microsoft.Office.Server.Search.Administration.Category
Concepts
Getting Started with the Enterprise Search Administration Object Model