search Element

This content is no longer actively maintained. It is provided as is, for anyone who may still be using these technologies, with no warranties or claims of accuracy with regard to the most recent product version or service release.

Represents a request method that searches for users.

Syntax

<search rid="string value"/>

Attributes

Attribute

Data Type

Description

Rid

string

Request Id. This is a string value assigned by the Unified Communications client. This is a required attribute.

Element Information

Parent Element

Element

Description

cwaRequests

Contains one or more methods that a Unified Communications AJAX API Client sends to a Communicator Web Access server.

Child Elements

Element

Occurrences

Description

firstName

0 or more

Individual first name to search for.

lastName

0 or more

Individual last name to search for.

displayName

0 or more

Display name of the URI being searched for.

emailAlias

0 or more

E-mail alias of the Uri being searched for. The ampersand (@) must be included in the emailAlias string or the Communicator Web Access server searches based on the user alias.

Function

0 or 1

Logical operator that joins the individual elements of the search query.

Remarks

This element allows the Unified Communications AJAX API Client application to search for other Office Communicator users by their first, last and display name. If the emailAlias element is included, the search is based on the alias portion of a user e-mail address. It is important to note that this element does not search for SIP aliases or user aliases. Communicator Web Access server returns a result set that might contain 0 to an unbounded number of users. For each of the returned users whose presence is requested, you have to make a queryPresence request.

The scope of the search should include all Office Communicator domains.

Examples

Example 1

The user is searching for another user whose first name is Tony and last name is Allen. The Communicator Web Access server returns all users that match the criteria. The function element of the search request specifies that both the firstName and lastName elements must match those of potential matches.

<search rid="24">
   <firstName>Tony</firstName>
   <lastName>Allen</lastName>
   <function>and</function>
</search>

Example 2

The user is searching for a specific user whose e-mail address is known. Tony Allen has an e-mail address of tonyA@contoso.com. He also has two user aliases, tony_A. and tonyAllen.

Note the inclusion of the ampersand symbol in the emailAlias element.

<search rid="24">
   <emailAlias>tonyA@contoso.com</firstName>
</search>

The search process finds Tony Allen because his e-mail alias is tonyA.

Example 3

The user is searching for Tony Allen from example 2. The search field emailAlias is used again but the user did not include the ampersand symbol and domain.

<search rid="24">
   <emailAlias>tonyA</firstName>
</search>

The search does not return any results. Because the emailAlias search field did not include the ampersand symbol, the search process looked for a user alias to match. Tony Allen has two user aliases, neither of which matches the search value of tonyA.

Example 4

In this example, the user is again looking for Tony Allen. This time however, he is using one of Tony Allen's actual user alias values in the emailAlias element

<search rid="24">
   <emailAlias>tony_A</firstName>
</search>

Although the emailAlias field was used, the user alias was searched and Tony Allen was found because one of his user aliases was in fact tony_A.

See Also

Concepts

queryPresence Element

subscribePresence Element