Skip to main content

more options.


Search Filter Options with
Cornell's Electronic Directory

Our Configure your E-mail page shows you how to set up your e-mail client to use Cornell's Electronic Directory to find addresses for you. The instructions there set up the search filter to do the following things:

  • find any names that include the text you typed anywhere in them (for example, if you typed son it would find Sonya Flynn, Allison Wilder, and Brian Paulson)
  • find any NetIDs that include the text you typed (like son99)
  • find any nicknames that include the text you typed (like Sonny Gunderson)

Here is the default filter we've given you:

(|(cn=*^0*)(uid=*^0*)(edupersonnickname=*^0*))

The entire filter is in parentheses.

The second character (a vertical line) means "show me all results that match at least one of the following."

We use the following fields in the database:

cn Complete name
uid NetID
edupersonnickname Nickname

You can also use sn for Lastname (surname).

The ^0 in each term represents the text you type when you do a search.

The asterisks are wildcards. They mean "I don't care what comes here, or even if anything comes here." In this case, each ^0 has a wildcard before and after it, so we're saying that the text we type can appear anywhere in the field.

  • If you only put an asterisk after the ^0, it means you only want entries that start with the text you type.
  • If you only put an asterisk before the ^0, it means you only want entries that end with the text you type.
  • If you don't use any asterisks, it means you only want entries that exactly match the text you type.

You can mix and match these techniques in your search filter. Here are some examples:

  • Search for any match on the complete name or an exact match on the NetID field.

    (|(cn=*^0*)(uid=^0))

  • Search for entries where the beginning of the complete name or the beginning of the nickname match your entry.

    (|(cn=^0*)(edupersonnickname=^0*)

  • Search for entries where the beginning of the last name matches your entry.

    (sn=^0*)

    (Notice that in this example that, since there is only one type of search, you don't need the vertical line or the additional set of parentheses.)