Each search object entry in dsgwsearchprefs.conf has a list of attributes that can be modified for advanced searches.
Standard and Advanced Searches
An advanced search differs from a standard search in that users are provided with a pull-down menu of search types. In the default gateway, the standard search form is used to search on object classes defined for the gateway. The advanced search form allows users to search object class attributes and to specify matching patterns (Figure 6.1 shows the entry types that can be selected, Figure 6.2 shows the specific attributes that can be searched on for person entries, and Figure 6.3 shows the matching types that can be specified).
Figure 6.1 Entry Type Pull-Down Menu for Advanced Search Form
Figure 6.2 Attribute Pull-Down Menu on Advanced Search Form
Figure 6.3 Matching Type Pull-Down on Advanced Search Form
Specifying Search Attributes for Person
The dsgwsearchprefs.conf syntax in Example 6.1 specifies that the cn, sn, telephoneNumber, mail, uid, and title attributes are used in a search for person entries.
Example 6.1 Search Attributes for Person Entry
People
""
"Search for":
"(&(objectClass=person)"
"dsgw-people"
subtree
"full name" cn 111111 "" ""
"last name" sn 111111 "" ""
"phone number" "telephoneNumber" 111011 "" ""
"e-mail address" "mail" 111111 "" ""
"user id" "uid" 111111 "" ""
"title" title 111111 "" ""
END
"is" "(%a=%v))"
"is not" "(!(%a=%v)))"
"sounds like" "(%a~=%v))"
"starts with" "(%a=%v*))"
"ends with" "(%a=*%v))"
"contains" "(%a=*%v*))"
END
The first column in Example 6.1 specifies how the LDAP attribute shown in the second column appears in the pull-down menu on the Advanced Search form. Choose one term form menu, or leave out.
The third column contains a string of six bits. Each bit position in the string maps to a match type, as shown in Table 6.2. A value of 1 in the bit position indicates that the match type is valid for the associated attribute. A value of 0 indicates that the match type is not valid. In Example 6.1, the bit position for the telephone number attribute is set to 0, so the Directory Server does not search for sounds like match types for phone number entries on the Advanced Search form.
The fourth and fifth columns in the search attributes contain empty strings required by the gateway. These should not be altered.
Directory Express Search Support for User ID
Directory Express looks for matches for user ID strings. It does not attempt to match user ID substrings.
To configure substring matching for user IDs, substring index the uid attribute and uncomment the appropriate lines in pbconfig/dsgwfilter.conf.
Adding Search Support for Additional Attributes
The boldface syntax in Example 6.2 shows the addition of preferences for searching the pagerTelephoneNumber attribute.
Example 6.2 Extending Search Preferences to Include Pager Number
People
""
"Search for":
"(&(objectClass=person)
"dsgw-people"
subtree
"full name" cn 111111 "" ""
"last name" sn 111111 "" ""
"phone number" "telephoneNumber" 111011 "" ""
"e-mail address" "mail" 111111 "" ""
"user id" "uid" 111111 "" ""
"title" title 111111 "" ""
"pager number" pagerTelephoneNumber 111011 "" ""
As a result of adding this syntax to dsgwsearchprefs.conf: