Sun Java logo     Previous      Contents      Index      Next     

Sun logo
Sun Java System Directory Editor 1 2005Q1 Installation and Configuration Guide 

Chapter 6
Searching Directories

You can use the Directory Editor Search tab to search for objects in the directory installation.

This chapter explains how to configure and execute three different types of searches from the Directory Editor Search page. In addition, this chapter explains how to change the appearance and content of your Search page. The information is organized as follows:


Note

If you are not using a VLV index, Directory Editor will return a maximum of 100 results. If a search yields more than 100 entries, a note will display above the Results table advising you that the results exceeded the 100-entry limit.

If there are too many entries returned, consider narrowing your search criteria or changing the Number of Results value (up to the limit imposed by Directory Server) on the Search Configuration page (Configure > Search Options).

If you are using a VLV index, this limit does not apply.



Executing a Basic Search

Use the Basic Search tab (the default page) to search for users, groups, or organizational units.

Figure 6-1  Search Results

Use the Basic Search tab to search for users, groups, or organizational units.

To perform a basic search, use the following steps:

  1. Enter the name of a user, a group, or an organizational unit into the text field provided.
  2. For example, type manager for a list of all objects that have “manager” in their name.

  3. Select a Search Type from the drop-down menu.
  4. Click the Search button or press Return (Enter) on your keyboard and the search results will display in table-format at the bottom of the Search page.
  5. For example, the following figure shows the result of searching for manager.

    Figure 6-2  Search Results
    Example results for a Basic Search

    If search results exceed the maximum number of lines permitted for a single page, Directory Editor will continue the Results table on a new page and display the following navigation tool.

    Use this navigation tool to view the different pages as follows:

    • Enter a page number into the text box and click the Go button to see a particular page in the set.
    • Click to go forward one page or to go back one page.
    • Click to go to the first page in the set or click to go to the last page in the set.

    • Note

      You can change the default setting for maximum number of lines to display per page. See Configuring the Results Table for more information.


      A bank of buttons also displays just above the Results table. Use these buttons in conjunction with the table.

      Note that each entry in the Results table is preceded by a checkbox. You can enable one or more checkboxes to select those rows for an action and then click one of the following buttons:

    • Create: Opens a Create page so you can add a new user, group, or organizational unit. (See Chapter 4, "Creating and Editing Objects.")
    • Delete: Opens an Delete page, where you must confirm whether to delete the object. Click Delete to confirm the action or click Cancel to terminate the action.
    • Rename: Opens a Rename page so you can specify a new name for that object and for children of the object. (See Chapter 4, "Creating and Editing Objects.")
    • Enable: Opens an Enable page, where you must confirm whether to enable the object. Click Enable to confirm the action or click Cancel to terminate the action.
    • Disable: Opens an Disable page, where you must confirm whether to disable the object. Click Disable to confirm the action or click Cancel to terminate the action.

    • Note

      You can also click any linked entry in the table’s Name column, to open the Edit an Object page where you can edit the object’s attributes. See Chapter 4, "Creating and Editing Objects." for more information about editing objects.



Executing an Advanced Search

Select the Advanced Search tab to search for objects by specifying search conditions, which can be combined with and operations.

Figure 6-3  Advanced Search Tab

Using the Advanced Search tab to search for users, groups, or organizational units.

To configure and execute an advanced search, use the following steps:

  1. Select one of the following object types from the Search type menu:
    • User
    • Group
    • Organizational Unit
    • Other
    • When you select the Other option, the Object Classes selection tool displays (similar to the one shown in the following figure).

      Figure 6-4  Selecting Object Classes
      Select the Other Search Type and the Object Classes selection tool is displayed.

    • You can select object classes from the Available Object Classes list and click the Add button to move the object classes to the Selected Object Classes list.
    • Click Add All to move all available object classes to the Selected Object Classes list.
    • Click Remove All to move all object classes from the Selected Object Classes list back to the Available Object Classes list.
    • Select object classes from the Selected Object Classes list and click Remove to move the object classes from the Selected list back to the Available Object Classes list.
  2. Enter a Base Context in the text box provided (or click Browse to search the organizational units in the directory).
  3. The Search will return results from items in this container and “contained” containers.

  4. Use the Search Conditions table to configure your search criteria, as follows:
    1. Click the drop-down button in the Attribute column to select an attribute from the list.

    2. Note

      • The attributes in this list are determined by the object type specified in Step 1.
        • To add rows to the Search Conditions table, click the Add Attribute button.
        • To Remove rows from the Search Conditions table, enable the checkbox in the leftmost column and then click the Remove Selected Attribute(s) button.
      • You cannot remove all rows in this table. If you try to remove the only remaining row, an error will result.

    3. Click the drop-down button in the Conditions column and select one of the following conditions from the list:
      • contains: Search for attributes that contain the specified attribute value.
      • equals: Search for attributes that match the specified attribute value exactly.
      • does not equal: Search for attributes that do not match the specified attribute value.
  5. Enter a value to search for into the Value column of the table.

  6. Note

    Each attribute, condition, and value builds a subexpression and all the subexpressions are “AND’ed” together to create the search criteria.

    If you do not provide a value, that subexpression will be ignored.


  7. Click the Search button.
  8. The search results will display in table-format just below the text field.


    Note

    If you are not using a VLV index, Directory Editor will return a maximum of 100 results. If a search yields more than 100 entries, a note will display above the Results table advising you that the results exceeded the 100-entry limit.

    If there are too many entries returned, consider narrowing your search criteria or changing the Number of Results value (up to the limit imposed by Directory Server) on the Search Configuration page (Configure > Search Options).

    If you are using a VLV index, this limit does not apply.


    The search results will display in table-format at the bottom of the Search page.

    As with a Basic Search, if your search results exceed the maximum number of lines permitted for a single page, Directory Editor will continue the Results table on a new page and display a navigation tool. Use this navigation tool to view the different pages as described on (more...)

    In addition, a bank of buttons (Create, Delete, Rename, Enable, and Disable) also displays just above the Results table. Use these buttons in conjunction with the table as described in Step 2.


    Note

    Click any of the linked entries in the Name column, and the Edit an Object page displays so you can edit the object’s attributes. (See Chapter 4, "Creating and Editing Objects" for information about editing objects.)


Following are several examples of an Advanced Search.

Example 1:    

Someone reports a “fender-bender” in the parking lot and you want to notify the car owner. You could specify the following parameters to identify the owner:

The following figure shows the result of searching for the license number:

Figure 6-5  Example 1 Search Results

Example results: Searching for a license number.

Example 2:    

You want to send an email to all Marketing managers. You could specify the following parameters to identify these managers:

The following figure shows the result of searching for Marketing managers:

Figure 6-6  Example 2 Search Results

Example results: Searching for Marketing managers.


Executing a Filtered Search

Select the Filtered Search tab to specify free-form query strings to search for objects in the directory.

Figure 6-7  Filtered Search tab

Use the Filtered Search tab to specify a free-form query string.

Use the default search string or enter your own query in the Search Filter text field.

For example, if you want to search for all groups in the directory, type the following text in the Search Filter text field and click Search:

(|(ObjectClass=groupofnames)(ObjectClass=groupofUniqueNames))


Note

You can change the default search string using the Search Configuration page (Configure > Search Options). See Specifying Default Settings for more information.


The following figure shows the result of the filtered search.

Figure 6-8  Example Filtered Search Results

Example results: Using a filtered search to search for all groups in the directory.

As with the other search methods, the search results will display in table-format at the bottom of the Search page.

In addition, a bank of buttons (Create, Delete, Rename, Enable, and Disable) displays just above the Results table. Use these buttons in conjunction with the table as described in step 2 on page 6-82.


Note

Click any of the linked entries in the Name column, and the Edit an Object page displays so you can edit the object’s attributes. (See Chapter 4, "Creating and Editing Objects" for information about editing objects.)



Editing the Search Page Configuration

The procedures in this section describe how to change the appearance and content of your Search page. The information is organized as follows:

Accessing the Search Configuration Page

To open the Search Configuration page, select the Configure > Search Options.
The Search Configuration page is displayed as follows:

Figure 6-9  Search Configuration Page

Use this page to edit your Search page.

This page contains three tabs:

Specifying Default Settings

Use the following procedure to configure a default search filter for the Search page.

  1. Select the Settings tab (see Figure 6-9).
  2. Modify the default filter shown in the Default Search Filter text box or enter a new filter.

  3. Caution

    Improper use of a search filter can impact both Directory Editor and Directory Server performance. For detailed information about constructing filters, refer to the Sun Java™ System Directory Server 5 2004Q2 Administration Guide.


  4. Modify or enter a new display name in the Display Name text box.
  5. You may want Directory Editor to return results in the same way your company displays data. For example; cn, uid, and so forth.


    Note

    The dollar sign ($) that precedes this value denotes the start of an attribute name.


  6. You can click Save to apply your changes (or click Cancel and return to the Home page).

  7. Note

    You do not have to Save your changes on each page — you can wait until you are finished working with all of the tabs and then save your changes to the directory.


From here, you can select another tab to continue configuring your Search page.

Configuring the Results Table

Use the following procedure to configure a results table for the Search page.

  1. Select the Results Table tab.
  2. Figure 6-10  Results Table Page
    Use the Results Table page to configure the search Results table.

  3. Use the Results Columns selection tool to add attributes to or remove attributes from the Selected Attributes list, as follows:
    • Select one or more attributes from the Available Attributes list and click the button to move them to the Selected Attributes list. (Press your Shift key and click on items in the list to select multiple attributes.)
    • Click the button to move all available attributes to the Selected Attributes list.
    • Click the button to move all attributes from the Selected Attributes list back to the Available Attributes list.
    • Select one or more attributes from the Selected Attributes list and click the button to move them back to the Available Attributes list.
    • Use the (move up) and (move down) buttons to change the order of attributes in the Selected Attributes list.
  4. By default, Directory Editor populates the Display Names table with Attribute Names and Display Names.
  5. You can replace the default names in the Display Names column by typing directly into the text boxes provided.

  6. Enter a value in the Column Width field to specify a maximum width (maximum character length) for columns in the Results table.
  7. Enter a value in the Maximum Number of results without VLV field to specify the maximum number of search results (how many lines) to display in the Results table if you are not using the Virtual List View LDAP protocol facility.

  8. Note

    • Directory Editor’s browse and search features both use an LDAP protocol facility called Virtual List View (VLV).
      This facility provides an LDAP client with the ability to specify a “window" into the data that is available on the LDAP server.
    • Changing the Maximum Number of results without VLV value will affect both a standard search and the group viewing features.

  9. Use Virtual List View Control is enabled (checked) by default.
  10. Virtual List View (VLV) is an LDAP protocol facility that enables an LDAP client to specify a “window" into the data that is available on the LDAP server. (For more information about this feature, see Appendix C, "Improving Performance of Browse and Search Features.")

  11. Enter a value in the Number of results per page field to specify the maximum number of search results (how many lines) to display in the Results table on a single page.
  12. If search results exceed this maximum number of lines, Directory Editor will continue the Results table on a new page. Use the navigation tool to view the different pages as follows:

    • Enter a page number into the text box and click the Go button to see a particular page in the set.
    • Click to go forward one page or to go back one page.
    • Click to go to the first page in the set or click to go to the last page in the set.
  13. Use the Search Types for Favored Attributes menu to select an attribute type (User, Group, or Organization) for the favored attributes to be selected in Step 9.
  14. Use the Favored Attributes selection tool to specify which attributes are available (and the order in which they display) when you click the Add Attributes button on the Advanced Search page:
    • Select one or more attributes from the Available Attributes list and click the button to move them to the Selected Attributes list. (Press your Shift key and click on items in the list to select multiple attributes.)
    • Click the button to move all available attributes to the Selected Attributes list.
    • Click the button to move all attributes from the Selected Attributes list back to the Available Attributes list.
    • Select one or more attributes from the Selected Attributes list and click the button to move them back to the Available Attributes list.
    • Use the (move up) and (move down) buttons to change the order of attributes in the Selected Attributes list.

Specifying Search Types

You can use the Search Types page to modify the kind of search Directory Editor performs by default.

Use the following procedure to specify the type of searches available for the Search page.

  1. Select the Search Types tab.
  2. Figure 6-11  Search Types Page
    Use the Search Types page to add/remove options to the Search Types drop-down menu.

  3. If necessary, change the Default Search Type name by entering a new value in the text box provided.
  4. Use the table to change the search type names and associated attributes that are available in the Search Type menu list.
    1. To change the name of a search type, delete the old name and enter a new value.
    2. For example, you might want to change Organization to Offices.

    3. Use the Objectclasses selection tools in the Value column to create a list of valid values for that search type.
    4. For example, you might want to specify the following values for the User type:

      • Person
      • organizationalPerson
      • inetorgPerson (default)
      • engineeringPerson

      • Note

        If you create a custom user class, you should add that object class to the user object.


  5. When you are finished, click the Save button to save your changes and return to the Home page (or click Cancel to undo your changes).

  6. Note

    You do not have to Save your changes on each page — you can wait until you are finished working with all of the tabs and then save your changes to the directory.


Adding Search Types

To add search types to the table, use the following procedure:

  1. Click the Add Type button located beneath the table.
  2. When Directory Editor adds a new row to the table, enter a name for the search type in the text box provided in the Name column.
  3. Use the Objectclasses selection tool in the Value column to create a list of valid values for the new search type.
  4. For example, you might want to specify a Location search type with the following object classes:

    • country
    • friendlyCountry
    • room
  5. When you are finished, click Save to save your changes and return to the Home page (or click Cancel to undo your changes).

Removing Search Types

To remove objects from the Search Types menu list,

  1. Enable the checkbox next to the search type you want to delete.
  2. Click the Remove Selected Types button located beneath the table.
  3. Directory Editor immediately removes that row from the table.

  4. Click Save to save your changes and return to the Home page, or click Cancel to undo your changes and return to the Home page.


Previous      Contents      Index      Next     


Part No: 819-2191.   Copyright 2004 Sun Microsystems, Inc. All rights reserved.