Справочник Пользователя для Red Hat Version4.1

Скачать
Страница из 156
Modifying Default Search Filters
66 Netscape Directory Server Gateway Customization Guide
The syntax in Example 6.6 specifies a list of filters for searching attributes in the 
orgRole object class.
Example 6.6 Creating a new dsgwfilter.conf entry for orgrole
dsgwfilter.conf:
dsgw-orgrole"
"="
" "
"(%v))"
"LDAP filter is"
"^[+]*[0-9][ 0-9-]*$" " "
"(telephoneNumber=*%v))" "phone number ends 
with"
"^\*$"
"  "
"(cn=*))" "name is"
".*"
". _" "(cn=%v1-))"
"name is"
"(cn=*%v1-*))"
"name contains"
"(cn~=%v1-))"
"name sounds like"
See Also
Modifying search results forms is described in “Modifying Search Result 
Templates” on page 69
Modifying Default Search Filters
The gateway uses dsgwflter.conf to map patterns in search strings to a relevant 
search filter and search result description (a search pattern is a grep-style 
regular expression). dsgwwfilter.conf can be optimized to respond to common 
user data patterns.
Netscape recommends modifying existing search filters in dsgwfilter.conf to 
support new user data patterns, instead of creating new filters.
Search Filters for User Data Patterns
Example 6.7 shows typical search filter syntax for any search string containing 
the at (@) symbol. In this example, the gateway responds to search strings 
containing the @ symbol (the pattern) by searching the mail attribute for values 
that are equal to or start with the supplied value (the filter). The gateway 
returns a message on the search results form indicating the number of entries 
where the “email address is” or “email address starts with” the user-supplied 
value (the description).