# Microsoft.Search.Query Schema Documentation

This topic contains documentation for the Microsoft.Search.Query schema. For the text of the schema, see Microsoft.Search.Query Schema.

## Documentation for the urn:Microsoft.Search.Query schema

Defines a query packet from the client to a service provider, which can in turn, contain several individual queries corresponding to each of the provider's services.

## Basic Schema Attributes

Attribute | Value
--- | ---
targetNamespace | urn:Microsoft.Search.Query
elementFormDefault | qualified
attributeFormDefault | unqualified (default)

## Declared Namespaces

Namespace | Prefix
--- | ---
urn:Microsoft.Search.Types | t:
urn:Microsoft.Search.Query | (default)
http://www.w3.org/2001/XMLSchema | xsd:
http://www.w3.org/XML/1998/namespace | xml:

## Imported Schemas

namespace | id | schemaLocation
--- | --- | ---
urn:Microsoft.Search.Types | (none) | Microsoft.Search.Types.xsd
urn:Microsoft.Search.Query.Office.Keywords | (none) | Microsoft.Search.Query.Office.Keywords.xsd
urn:Microsoft.Search.Query.Office.Context | (none) | Microsoft.Search.Query.Office.Context.xsd

## Overview

<QueryPacket>

<Query>

<QueryId/>

<OriginatorId/>

<SupportedFormats>

<Format/>

<Any/>

</SupportedFormats>

<Context>

<QueryText/>

<LanguagePreference/>

<Requery>

<RequeryContext>

<Any/>

</RequeryContext>

<Any/>

</Requery>

<OriginatorContext>

<Any/>

</OriginatorContext>

<Any/>

</Context>

<Range>

<ResultType/>

<StartAt/>

<Count/>

<Any/>

</Range>

<Any/>

</Query>

<Any/>

</QueryPacket>

## Top-Level Elements

Element: QueryPacket

A query packet from the client to a service provider, which can in turn contain several individual queries corresponding to each of the provider's services.

Property | Value
--- | ---
abstract | false (default)
name | QueryPacket
nillable | false (default)
type | complexType

Attributes

- Attribute: revision

  Unsigned integer indicating the revision of the schema used in the request.

  Property | Value
  --- | ---
  name | revision
  type | xsd:unsignedInt
  use | optional

- Attribute: build

  The build of the component used to generate the request.

  Property | Value
  --- | ---
  name | build
  type | t:String255
  use | optional

Subelements: Sequence

Elements must appear in the specified order.

- Element: Query

  An individual query directed at a service.

  Property | Value
  --- | ---
  abstract | false (default)
  minOccurs | 1
  maxOccurs | unbounded
  name | Query
  nillable | false (default)
  type | QueryType

- Any

  Any element in another namespace. Can be used for extensibility in the future.

  Property | Value
  --- | ---
  namespace | ##other
  processContents | skip
  minOccurs | 0
  maxOccurs | unbounded

## Top-Level Types and Groups

- Complex Type: QueryType

  Describes an individual query directed at a service.

  Attributes

  - Attribute: domain

    A unique domain identifier for the service handling the query. The response from the service should have a matching domain attribute.

    Property | Value
    --- | ---
    name | domain
    type | t:String255
    use | optional

  Subelements: Sequence

  Elements must appear in the specified order.

  - Element: QueryId

    Unique ID identifying the query. Can be used for tracking purposes. Microsoft® Office always uses a globally unique identifier (GUID).

    Property | Value
    --- | ---
    abstract | false (default)
    minOccurs | 0
    maxOccurs | 1 (default)
    name | QueryId
    nillable | false (default)
    type | t:String255

  - Element: OriginatorId

    The service should be able to uniquely identify the client through this ID.

    Property | Value
    --- | ---
    abstract | false (default)
    minOccurs | 0
    maxOccurs | 1 (default)
    name | OriginatorId
    nillable | false (default)
    type | t:String255

  - Element: SupportedFormats

    Formats that the client understands for the response.

    Property | Value
    --- | ---
    abstract | false (default)
    minOccurs | 1
    maxOccurs | 1 (default)
    name | SupportedFormats
    nillable | false (default)
    type | SupportedFormatsType

  - Element: Context

    Context information, including the actual query.

    Property | Value
    --- | ---
    abstract | false (default)
    minOccurs | 0
    maxOccurs | 1 (default)
    name | Context
    nillable | false (default)
    type | ContextType

  - Element: Range

    Range information, including the number of results expected. Office will never request more than one range.

    Property | Value
    --- | ---
    abstract | false (default)
    minOccurs | 0
    maxOccurs | unbounded
    name | Range
    nillable | false (default)
    type | RangeType

  - Any

    Any element in another namespace. Office 2003 will emit elements in the OfficeContext and Keywords namespaces here. This area can also be used for extensibility.

    Property | Value
    --- | ---
    namespace | ##other
    processContents | strict (default)
    minOccurs | 0
    maxOccurs | unbounded

- Complex Type: SupportedFormatsType

  Describes any number of formats that the client understands for the response.

  Attributes

  None

  Subelements: Sequence

  Elements must appear in the specified order.

  - Element: Format

    Supported response elements (QNames). All recognized namespaces should be specified here.

    Property | Value
    --- | ---
    abstract | false (default)
    minOccurs | 1
    maxOccurs | unbounded
    name | Format
    nillable | false (default)
    type | FormatType

  - Any

    Any element in another namespace. Can be used for extensibility in the future.

    Property | Value
    --- | ---
    namespace | ##other
    processContents | skip
    minOccurs | 0
    maxOccurs | unbounded

- Complex Type: FormatType

  Defines a supported format.

  Attributes

  - Attribute: revision

    Unsigned integer indicating the revision of the schema used.

    Property | Value
    --- | ---
    name | revision
    type | xsd:unsignedInt
    use | optional

  - Attribute: build

    The build of the component used.

    Property | Value
    --- | ---
    name | build
    type | t:String255
    use | optional

  Simple Content

  Base

  base | xsd:string

- Complex Type: ContextType

  Attributes

  None

  Subelements: Sequence

  Elements must appear in the specified order.

  - Element: QueryText

    Query to perform the search on.

    Property | Value
    --- | ---
    abstract | false (default)
    minOccurs | 0
    maxOccurs | 1 (default)
    name | QueryText
    nillable | false (default)
    type | QueryTextType

  - Element: LanguagePreference

    Language preference for the response. This applies mainly to user interface elements, not to content.

    Property | Value
    --- | ---
    abstract | false (default)
    minOccurs | 0
    maxOccurs | 1 (default)
    name | LanguagePreference
    nillable | false (default)
    type | xsd:language

  - Element: Requery

    Requery data from the service that is sent back to the client.

    Property | Value
    --- | ---
    abstract | false (default)
    minOccurs | 0
    maxOccurs | 1 (default)
    name | Requery
    nillable | false (default)
    type | RequeryType

  - Element: OriginatorContext

    This piece of context will be sent to the service and then sent back again to the client. Office 2003 currently does not emit this element.

    Property | Value
    --- | ---
    abstract | false (default)
    minOccurs | 0
    maxOccurs | 1 (default)
    name | OriginatorContext
    nillable | false (default)
    type | OriginatorContextType

  - Any

    Any element in another namespace. Can be used for extensibility in the future.

    Property | Value
    --- | ---
    namespace | ##other
    processContents | skip
    minOccurs | 0
    maxOccurs | unbounded

- Complex Type: QueryTextType

  Defines the query to perform the search on.

  Attributes

  - Attribute: language

    The language of the query string, if Office 2003 can determine it.

    Property | Value
    --- | ---
    name | language
    type | xsd:language
    use | optional

  - Attribute: type

    The type of query. All queries generated by Office 2003 are strings.

    Property | Value
    --- | ---
    default | STRING
    name | type
    type | simpleType
    use | optional

    Base

    base | xsd:string

    Restrictions

    Restriction | Value
    --- | ---
    enumeration | STRING ID MSSQLFT XPATH BOOLEAN

  Simple Content

  Base

  base | xsd:string

- Complex Type: RequeryType

  Defines requery data from the service being round-tripped through the client.

  Attributes

  None

  Subelements: Sequence

  Elements must appear in the specified order.

  - Element: RequeryContext

    Server data being round-tripped by the client.

    Property | Value
    --- | ---
    abstract | false (default)
    minOccurs | 0
    maxOccurs | 1 (default)
    name | RequeryContext
    nillable | false (default)
    type | RequeryContextType

  - Any

    Any element in another namespace. Office 2003 will emit the ServiceParameters element here. It contains all the forms data. This area can also be used for extensibility.

    Property | Value
    --- | ---
    namespace | ##other
    processContents | strict (default)
    minOccurs | 0
    maxOccurs | unbounded

- Complex Type: RequeryContextType

  Defines the requery context that a service can have the client pass back, during a requery only. It is an arbitrary XML data island.

  Attributes

  None

  Subelements: Sequence

  Elements must appear in the specified order.

  - Any

    Any element in another namespace. This is an XML island the service is passing to the client for round-tripping.

    Property | Value
    --- | ---
    namespace | ##other
    processContents | skip
    minOccurs | 1 (default)
    maxOccurs | unbounded

- Complex Type: OriginatorContextType

  Defines context data from the client to be round-tripped through the service.

  Attributes

  None

  Subelements: Sequence

  Elements must appear in the specified order.

  - Any

    Any element in another namespace. This is an XML island the client passed to the service for round-tripping.

    Property | Value
    --- | ---
    namespace | ##other
    processContents | skip
    minOccurs | 1 (default)
    maxOccurs | unbounded

- Complex Type: RangeType

  Defines the Range element that contains information about the results being requested.

  Attributes

  - Attribute: id

    A unique ID for the Range element.

    Property | Value
    --- | ---
    name | id
    type | xsd:string
    use | optional

  Subelements: Sequence

  Elements must appear in the specified order.

  - Element: ResultType

    Optional string describing the type of result. Office 2003 will not emit this element.

    Property | Value
    --- | ---
    abstract | false (default)
    minOccurs | 0
    maxOccurs | unbounded
    name | ResultType
    nillable | false (default)
    type | t:String2048

  - Element: StartAt

    The index of the initial result requested, based on "1" as the lowest result index.

    Property | Value
    --- | ---
    abstract | false (default)
    default | 1
    minOccurs | 0
    maxOccurs | 1 (default)
    name | StartAt
    nillable | false (default)
    type | t:StartAtType

  - Element: Count

    Total results of this type to return. Note that fewer than this number may be returned if there are not enough results, and more than this number may be returned due to policy restrictions. If more results are returned, the client should display them all. Absence of Count implies provider discretion.

    Property | Value
    --- | ---
    abstract | false (default)
    minOccurs | 0
    maxOccurs | 1 (default)
    name | Count
    nillable | false (default)
    type | xsd:unsignedInt

  - Any

    Any element in another namespace. Can be used for extensibility in the future.

    Property | Value
    --- | ---
    namespace | ##other
    processContents | skip
    minOccurs | 0
    maxOccurs | unbounded

©2003-2004 Microsoft Corporation. All rights reserved. Permission to copy, display and distribute this document is available at: http://msdn.microsoft.com/library/en-us/odcXMLRef/html/odcXMLRefLegalNotice.asp