Indexing Cfldap Query Results - MACROMEDIA COLDFUSION 5-DEVELOPING Develop Manual

Table of Contents

Advertisement

Indexing Query Results
This
indexed and names the table's primary key, the Message_ID column, as the
value. Note that the
title
To index more than one column in a collection, enter a comma-separated list of
column names for values of the
body=FirstName,LastName,Company

Indexing cfldap query results

The widespread use of the Lightweight Directory Access Protocol to build searchable
directory structures, both internally and across the Web, gives you opportunities to
add value to the sites you create. You can index contact information or other data
from an LDAP-accessible server and allow users to search it.
When creating an index from an LDAP query, remember the following
considerations:
In the example below, the search criterion is records with a telephone number in the
617 area code. Generally, LDAP servers use the Distinguished Name (dn) attribute as
the unique identifier for each record so that is used as the
<!--- Run the LDAP query --->
<cfldap name="OrgList"
<!--- Output query result set --->
<cfoutput query="OrgList">
=============================<br>
</cfoutput>
<!--- Index the result set --->
body="MessageText"
key="Message_ID"
title="Subject"
query="Messages">
statement specifies the MessageText column as the information to be
cfindex
title
attribute to designate an output parameter.
Because LDAP structures vary greatly, you must know the server's directory
schema and the exact name of every LDAP attribute you intend to use in a query.
The records on an LDAP server can be subject to frequent change. You might
want to re-index the collection before processing a search request.
server="myserver"
action="query"
attributes="o, telephonenumber, dn, mail"
scope="onelevel"
filter="(|(O=a*) (O=b*))"
sort="o"
start="c=US">
DN: #dn# <br>
O: #o# <br>
TELEPHONENUMBER: #telephonenumber# <br>
MAIL: #mail# <br>
attribute names the Subject column. You can use the
attribute, such as:
body
key
value for the index.
key
283

Advertisement

Table of Contents
loading

This manual is also suitable for:

Coldfusion 5

Table of Contents