Compartir a través de


scopeItem Element (Search Connector Schema)

[This documentation is preliminary and is subject to change.]

The <scopeItem> element represents a single entry in the exclusion/inclusion scope table. <scopeItem> extends the standard shellLinkType type by adding three new elements that control inclusion and exclusion of folders, control the depth of results, and specify the location of the scope. If the <scope> element exists, this element is required. It has three child elements and no attributes.

Syntax

<!-- scopeItem -->
    <xs:complexType name="searchConnectorDescriptionType">
        <xs:all>
        ...
        <xs:element name="scope" minOccurs="0">
            <xs:complexType>
                <xs:sequence minOccurs="0">
                    <xs:element name="scopeItem" maxOccurs="unbounded">
                        <xs:complexType>
                            <xs:all>
                                <xs:element name="mode" default="Include">
                                    ...
                                </xs:element>
                                <xs:element name="depth" default="Shallow" minOccurs="0">
                                    ...
                                </xs:element>
                                <xs:element name="url" type="xs:anyURI"/>
                            </xs:all>
                        </xs:complexType>
                    </xs:element>
                </xs:sequence>
            </xs:complexType>
        </xs:element>
        ...
        </xs:all>
        <xs:attribute name="publisher" type="xs:string"/>
        <xs:attribute name="product" type="xs:string"/>
    </xs:complexType>

Element Information

Parent Element Child Elements
scope Element (Search Connector Schema) scope Element (Search Connector Schema).
  scope Element (Search Connector Schema).
  url Element (Search Connector Schema).

Remarks

Use the <scope> and <scopeItem> elements to identify which locations should be searched and which locations should be excluded from search.

Example

The following example shows a search scope that includes C:\ExampleFolder and all its child folders except C:\ExampleFolder\ExcludeMe.

<?xml version="1.0" encoding="UTF-8"?>
<searchConnectorDescription xmlns="https://schemas.microsoft.com/windows/2009/searchConnector">
    ...
    <scope>
        <scopeItem>
            <mode>Include</mode>
            <depth>Deep</depth>
            <url>C:\ExampleFolder</url>
        </scopeItem>
        <scopeItem>
            <mode>Exclude</mode>
            <depth>Deep</depth>
            <url>C:\ExampleFolder\ExcludeMe</url>
        </scopeItem>
    </scope>
    ...
</searchConnectionDescription>