Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

ManagedProperty Interface

SharePoint 2010

Represents a managed property in the index schema.

Namespace:  Microsoft.SharePoint.Search.Extended.Administration.Schema
Assembly:  Microsoft.SharePoint.Search.Extended.Administration (in Microsoft.SharePoint.Search.Extended.Administration.dll)
[SharePointPermissionAttribute(SecurityAction.LinkDemand, ObjectModel = true)]
[SharePointPermissionAttribute(SecurityAction.InheritanceDemand, ObjectModel = true)]
public interface ManagedProperty

Managed properties are the set of properties that are available to the search user experience. To create a managed property, use the Create method of the ManagedPropertyCollection class. To delete a managed property, use the Delete() method of the ManagedProperty class.

The following code example writes out the full list of managed properties to the console window.

            using System;
            using Microsoft.SharePoint.Search.Extended.Administration;
            using Microsoft.SharePoint.Search.Extended.Administration.Schema;
            namespace ManagedPropertiesSample
                class Program
                    static void Main(string[] args)
                            SchemaContext schemaContext = new SchemaContext();
                            Schema schema = schemaContext.Schema;
                            //Fetch all managed properties
                            ManagedPropertyCollection properties = schema.AllManagedProperties;
                            foreach (ManagedProperty property in properties)
                        catch (Exception ex)
Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

© 2014 Microsoft. All rights reserved.