If a server holds a copy or partial copy of the subordinate naming context (Section 5 of RFC 4512, it may use the search filter to determine whether or not to return a SearchResultReference response. Otherwise, SearchResultReference responses are always returned when in scope.
The SearchResultReference is of the same data type as the LDAP Referral.
If the DUA wishes to progress the Search, it issues a new SearchRequest operation for each SearchResultReference that is returned. If multiple URIs are present, the client assumes that any supported URI may be used to progress the operation.
Clients (DUA) that follow search continuation references MUST ensure that they do not loop between servers (DSA). They MUST NOT repeatedly contact the same server for the same request with the same parameters. Some clients use a counter that is incremented each time search result reference handling occurs for an operation, and these kinds of clients MUST be able to handle at least ten nested referrals while progressing the operation.
Note that the Abandon Request operation described in applies only to a particular operation sent at the LDAP Message layer between a client and server. The client MUST individually issue Abandon Request for all subsequent Search operations.
A URI for a server implementing LDAP and accessible via TCP/IP (IPv4 or IPv6) RFC 793 & RFC 791 is written as an LDAP URL according to RFC 4516.
SearchResultReference values that are LDAP URLs follow these rules:
UTF-8-encoded characters appearing in the string representation of a DN, search filter, or other fields of the referral value may not be legal for URIs (e.g., spaces) and MUST be escaped using the % method in RFC 3986.
SearchResultEntry for DC=Example,DC=NET SearchResultEntry for CN=Manager,DC=Example,DC=NET SearchResultReference { ldap://hostb/OU=People,DC=Example,DC=NET??sub ldap://hostc/OU=People,DC=Example,DC=NET??sub } SearchResultReference { ldap://hostd/OU=Roles,DC=Example,DC=NET??sub } SearchResultDone (success)Client implementors should note that when following a SearchResultReference, additional SearchResultReference may be generated. Continuing the example, if the client contacted the server (hostb) and issued the Search request for the subtree
SearchResultEntry for OU=People,DC=Example,DC=NET SearchResultReference { ldap://hoste/OU=Managers,OU=People,DC=Example,DC=NET??sub } SearchResultReference { ldap://hostf/OU=Consultants,OU=People,DC=Example,DC=NET??sub } SearchResultDone (success)Similarly, if a singleLevel Search of <DC=Example,DC=NET> is requested to the contacted server, it may return the following:
SearchResultEntry for CN=Manager,DC=Example,DC=NET SearchResultReference { ldap://hostb/OU=People,DC=Example,DC=NET??base ldap://hostc/OU=People,DC=Example,DC=NET??base } SearchResultReference { ldap://hostd/OU=Roles,DC=Example,DC=NET??base } SearchResultDone (success)If the contacted server does not hold the base object for the Search, but has knowledge of its possible location, then it may return a referral to the client. In this case, if the client requests a subtree Search of <DC=Example,DC=ORG> to hosts, the server returns a SearchResultDone containing a referral.
SearchResultDone (referral) { ldap://hostg/DC=Example,DC=ORG??sub }!! More Information There might be more information for this subject on one of the following: