Sun Directory Services 3.1 User's Guide

Searching for an Entry

Use Search when you want to find an entry in the directory. This function provides search facilities based on up to three criteria. Figure 2-10 shows the Deja Search panel. The available search types are defined in the Deja.properties file on the directory server. For information on modifying the default searches see "Standard Search Parameters". For information on adding a new search see "Adding a New Standard Search".

Figure 2-10 Deja Search Panel

Graphic

  1. Click on the Search icon, or select Search from the Entry menu.

    The Search panel is displayed.

  2. Select the type of entry you want to search for using the Person option button.

    The options in the Person option button are defined in the Deja.properties file on the directory server. See "Standard Search Parameters" for information on defining standard searches.

    Default options are:

  3. Type the text string or filter you want to search for in the search text field.

    The search can include the wildcard character *.

  4. Click Search to start the search.

    The search results are displayed in the search results list and the number of entries found is displayed in the status bar. If there are no matches, the search results list is empty and the status bar indicates that no entries were found.

    You can refine your search in two ways:

  5. To stop the search at any time, click the Stop button.

    The search is stopped and no results are returned.

  6. Click the Clear button to clear the search text field.

Search Filters

Using a search filter is a way of specifying a set of entries, based on the presence of a particular attribute or attribute value. You can combine and or or logical operators in the same search. Use & for and and | for or. Table 2-1 gives some examples of filters.

Table 2-1 Search Filter Examples

Filter 

Definition 

l=London

locality is "London" 

cn=*Rob*

common name contains "Rob" 

(&(cn=Ch*)(cn=*Thomas*))

comman name starts with "Ch" and contains "Thomas" 

(|(sn=*bert*)(sn=*bort*))

surname contains "bert" or "bort" 

(&(cn=Rob*)(|(cn=*Green*)(cn=*Jones*))

common name starts with "Rob" and contains "Green" or "Jones" 

Combining Searches

You can combine your first search string with up to two other text strings using and or or logical operators. You cannot combine both operators in the same search. For example, you can search for cn=*Robert* and l=Boston and o=xyz, or you can search for cn=*Robert* or l=Boston or o=xyz.

  1. Select the type of entry you want to search for using the Person option button.

  2. Type the text string you want to search for in the search text field.

  3. Click on the And or Or buttons to select the logical operator.

  4. Select the entry type for the second text string using the Person option button.

  5. Type the second text string in the search text field.

  6. If you want to add a third search criterion, click the And or Or button.

  7. To remove a search criterion, click the Back button.

  8. Click the Clear button to clear all the search text fields.

Using Search Contraints

If you do not set all of the search constraints, the default values are used.

  1. Type the Distinguished Name (DN) of the root of the subtree you want to search.

    Or, select the root of the subtree you want to search in the browser window and click Get from Browser.

  2. Select the search time limit (in ms) from the Time Limit option button.

    By default, there is no time limit.

  3. Select the maximum number of search results from the Max. Matches option button.

    The default maximum number of search matches is 100.

  4. Select the scope of the search from the Search Scope option button.

    • One Level searches the entries on the level immediately below the search root.

    • Subtree searches all entries below the search root.

    The default scope is subtree.

  5. If you want to dereference aliases as you search, check the Dereference Aliases check box.

    If you choose to dereference aliases as you search, the distinguished name (DN) of an alias entry is translated to the DN of the actual entry. With the dereferencing flag checked, the object referred to by the alias is returned by a search. With the dereferencing flag unchecked, the alias entry is returned by a search.

Search Results List

Search results are displayed in the list below the search criteria.

The RDN, common name, telephone number and email address for each match are displayed.

    To view an entry, double-click on the entry's name in the search results list.

    The view entry window is displayed.