Partager via


scope Element (Search Connector Schema)

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

The optional <scope> element specifies a collection of <scopeItem> elements that define the scope inclusions and exclusions for this particular search connector. If <scope> is present, it MUST contain at least one <scopeItem> element. This element has no attributes.

Syntax

<!-- scope -->
    <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: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
searchConnectorDescriptionType Element (Search Connector Schema) scopeItem 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 childe 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>