Previous Topic: read-req Command—Read an Entry

Next Topic: search-req-filter

search-req Command—Find Entries

The search-req command finds entries within a namespace partition.

The search service can return many objects. If the search exceeds a size limit or a time limit, or if the DUA receives an abandon request, the search returns partial results, that is, the entries that it collected before being stopped.

The search is successful if it can find its base object.

The search detects if an alias directly or indirectly points to itself, and returns an error.

The command has the following format:

search-req
	base-object = DN
	[one-level-only | base-object-only | whole-subtree]
	[filter = { search-req-filter }]
	[no-info-return]
	[dont-search-aliases | search-aliases]
	[attr-only | attr-and-val]
	[all-attrs | attrs = attribute [,attribute...]]
	[common-args]
	;

Example: Search Service for One Entry

The following example is equivalent to a read-req. It retrieves all attributes and values of one entry:

search-req
	base-object =	<countryName "AU">
	<organizationName "Democorp">;

Example: Search Service for Single Level

The following example is equivalentg to a list-req. It retrieves the names of all objects from one level under Democorp:

search-req
	base-object =	<countryName "AU">
	<organizationName "Democorp">
	one-level-only
	no-info-return;

Example: Search Service for Subtree

The following example searches all entries under Democorp, including Democorp. It retrieves all information about every entry that contains an attribute surname with the value Smith:

search-req
	base-object =	<countryName "AU">
		<organizationName "Democorp">
	whole-subtree
	filter = { attr = surname value = "Smith" };

Example: Search Service for Local Directory Tree

Search the local directory tree, retrieving all objects that contain a surname attribute with a value of Smith and a title attribute with a value of Manager and a telephoneNumber attribute. Retrieve only the commonName, surname, and telephoneNumber attributes of the objects matching the search filter.

search-req
	base-object = <>
	whole-subtree
	filter = { and {attr = surname value = "Smith",
		attr = title substrings [ any "Manager"],
		attr = telephoneNumber present}
		}
	attrs = commonName, surname, telephoneNumber
	common-args = { local-scope };


Copyright © 2009 CA. All rights reserved. Email CA about this topic