New-SPEnterpriseSearchMetadataManagedProperty
Applies to: SharePoint Server 2010
Topic Last Modified: 2010-02-11
Adds a managed property to a shared search application.
Syntax
New-SPEnterpriseSearchMetadataManagedProperty [-Name] <String> -SearchApplication <SearchServiceApplicationPipeBind> -Type <Int32> [-AssignmentCollection <SPAssignmentCollection>] [-Confirm [<SwitchParameter>]] [-DefaultForQueryIndependentRank <Nullable>] [-Description <String>] [-EnabledForQueryIndependentRank <Nullable>] [-EnabledForScoping <Nullable>] [-FullTextQueriable <Nullable>] [-IncludeInMd5 <Nullable>] [-NameNormalized <Nullable>] [-NoWordBreaker <Nullable>] [-RemoveDuplicates <Nullable>] [-RespectPriority <Nullable>] [-Retrievable <Nullable>] [-UserFlags <Nullable>] [-WhatIf [<SwitchParameter>]]
Detailed Description
The New-SPEnterpriseSearchMetadataManagedProperty cmdlet creates a new managed property for a crawled property mapping. SPEnterpriseSearchMetadataManagedProperty represents a managed property in the enterprise search metadata property schema.
Parameters
Parameter | Required | Type | Description |
---|---|---|---|
Name |
Required |
System.String |
Specifies the name of the new managed property. The type must be a valid name of a managed property (for example, ManagedProperty1). |
SearchApplication |
Required |
Microsoft.Office.Server.Search.Cmdlet.SearchServiceApplicationPipeBind |
Specifies the search application that contains the managed property collection. The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid search application name (for example, SearchApp1); or an instance of a valid SearchServiceApplication object. |
Type |
Required |
System.Int32 |
Specifies the data type of the new managed property. The type must be one of the following data types: Text Integer Decimal DateTime YesNo Binary |
AssignmentCollection |
Optional |
Microsoft.SharePoint.PowerShell.SPAssignmentCollection |
Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects are automatically disposed of if an assignment collection or the Global parameter is not used. Note When the Global parameter is used, all objects are contained in the global store. If objects are not immediately used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur. |
Confirm |
Optional |
System.Management.Automation.SwitchParameter |
Prompts you for confirmation before executing the command. For more information, type the following command: get-help about_commonparameters |
DefaultForQueryIndependentRank |
Optional |
System.Nullable |
Specifies that the property is mandatory when it is used in query-independent rank (relevance). The default value is 0. |
Description |
Optional |
System.String |
Adds a description for the new metadata managed property. The type must be a valid string; for example, a description for a metadata managed property. |
EnabledForQueryIndependentRank |
Optional |
System.Nullable |
Specifies that the property can be used in query-independent rank (relevance). The default value is 0. |
EnabledForScoping |
Optional |
System.Nullable |
Specifies that the property can be used in a scope definition. The default value is 0. |
FullTextQueriable |
Optional |
System.Nullable |
Specifies that the managed property can be used in enterprise search SQL queries. |
IncludeInMd5 |
Optional |
System.Nullable |
Specifies that the managed property is included in the hash used by the crawler to determine whether a document has changed. The default value is 0. |
NameNormalized |
Optional |
System.Nullable |
Specifies that the managed property has been converted to the full name. The default value is 0. |
NoWordBreaker |
Optional |
System.Nullable |
Specifies that the values for this property are processed by a word breaker. The default value is 0. |
RemoveDuplicates |
Optional |
System.Nullable |
Specifies that duplicate values for the property are removed. The default value is 1. |
RespectPriority |
Optional |
System.Nullable |
Specifies that only one instance of the property exists for an item. The default value is 0. |
Retrievable |
Optional |
System.Nullable |
Specifies that the property can be used for advanced search or keyword queries, and that the value for this property can be retrieved in search results. |
UserFlags |
Optional |
System.Nullable |
Reserved for future use. |
WhatIf |
Optional |
System.Management.Automation.SwitchParameter |
Displays a message that describes the effect of the command instead of executing the command. For more information, type the following command: get-help about_commonparameters |
Input Types
Return Types
Example
------------------EXAMPLE------------------
$searchapp = Get-SPEnterpriseSearchServiceApplication "SearchApp1"
New-SPEnterpriseSearchMetadataManagedProperty -SearchApplication $searchapp -Name testmanagedproperty -Type 1
This example adds a new text type managed property to a search application.