Skip to content

Latest commit

 

History

History
87 lines (60 loc) · 2.71 KB

search-schema-sconn-scope.md

File metadata and controls

87 lines (60 loc) · 2.71 KB
description ms.assetid title ms.topic ms.date
The optional <scope> element specifies a collection of <scopeItem> elements that define the scope inclusions and exclusions for this particular search connector.
9e92e3db-3d5e-4f86-8d67-90eb5469b04b
scope Element (Search Connector Schema)
article
05/31/2018

scope Element (Search Connector Schema)

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 searching.

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="http://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>