Full Search Specs

Under construction
1/31/00 First draft
5/22/00 Reviewed by Rob
8/8/00 add stuff about ugly vs simple search
11/20/00 update substring vs text string vs people searches 11/20/00 Last modified by SY

Table of Contents


General Requirements

In general, full search allows searches on almost every field. There are two modes of searching- "ugly" and "simple". For this release, only simple Node and User full search are implemented.

Ugly vs. Simple Mode

In simple mode, each row of the result is one record, one object. This is more intuitive since generally a record corresponds to one computer or printer. Rows are sorted alphabetically by object name. If asked to display a certain field, the results will show all entries in the field if the object satisfies the search parameters. Search results will not show more advanced names- IPC, interface name, and IP address name. These names can be viewed on the node info page.

In ugly mode, the results are shown from a database point of view. For node, the ugly mode is more powerful because the results can be sorted on any field (for instance, department). Also, ugly mode includes searching and displaying all name types. Ugly mode for Node will eventually be implemented because of its power.


Input Requirements

The first section describes the types of expressions and operators allowed in full search. The second section, search parameter types, describes the different types of fields- for instance, an IP address field will allow different formats from People fields. The Table of Search Types, Fields and Field Types maps field type to field and also shows the default display.

Search Expressions, Operators and Parsing The following describes the various types of expressions and operators allowed in the full search input fields.
Note! Because of Sybase limitations, more than 4 boolean operators or separators may result in an error. For example, in "Created By" field, the string "not waugh not alchew not pmurray not reuber not dru" may cause an invalid input error.

  1. Regular expressions
    • * and % are multi-character wildcards
    • _ and ? are single character wildcards
    • [ ] indicates a range of characters
    • [^] indicates NOT in a range of characters
  2. Separators
    • separators are non-quoted spaces
    • trailing and leading spaces are stripped off unless quoted
  3. Quotes: first quote(double only) must be preceded by separator or beginning of line
  4. Boolean Operators- listed in order of precedence
    • NOT operators: "NOT" , "not". If there is no preceding operator, AND is implied (i.e., "A not B" is equivalent to "A and not B")
    • AND operators: "AND", "and"
    • OR operators: "OR", "or"
    • Unsupported: not (a and b)
    • Examples: "A not B or D and C" is equivalent to "(A and not B) or (D and C)"
  5. Case- all fields are case-insensitive
  6. Bad characters
    • HTML will not be executed but escaped
    • sql commands won't be executed

Search Parameter Types- Summary

  1. Regular input field- allows booleans, wildcards
  2. Substring input field - automatic substring search, booleans, wildcards
  3. Label/Value input fields
  4. People input fields
  5. Select box- allow multiple selections with choice of boolean operators
  6. Date fields
  7. Radio buttons
  8. Checkboxes
  9. IP Address field
  10. Not searchable- display only
  11. Sort order pulldown
  12. Display order pulldown

Search Parameter Types- elaborated

  1. Text input field

    The text input field allows all the expressions and operators described above.

  2. Substring input field

    Same as regular input field but also allows substring search. i.e., if "eng" is entered, the search is actually "*eng*". Generally for fields that have an associated list, like group or department. Here are examples:

    • terman engineering = "*terman* *engineering*"
    • "Asian Languages" and Art = "*Asian Languages*" and "*art*"
    • aero/astro and not mech eng = "*aero/astro*" and not "*mech* *eng*"

  3. Label/Value input field
    • "=" will separate label from value
    • all the expressions described above are allowed
    • search as if "
    • if space in value or label, quote entire string. For instance, when searching for a node with label "field 1", use the quoted string "field 1=*".

  4. People Input Fields
    For people names (netdb user, node user, node administrator, network consultant, admin team members, created by, modified by):
    • Full Name -text search. This can cause problems if the user has a unknown middle initial. For instance, a person named "Leland J. Stanford" will not be found if the search is for "Leland Stanford". But "Leland*Stanford" will find this person.
    • SUNetID- this field allows all the expressions described above
    • AdminTeam- this field is for searching AdminTeam names. The semicolon (which was used to designate an admin team under Node administrator) should not be appended

  5. Date Fields

    Two input fields ("On and Before", "On and After" or From/To) will be used for date searches (last login, expiration date, created on, modified on). No wildcards are allowed. Allowable date formats are:

    • m/d/yyyy, m/dd/yyyy, mm/d/yyyy, mm/dd/yyyy
    • m-d-yyyy, m-dd-yyyy, mm-d-yyyy, mm-dd-yyyy

  6. Radio Buttons

  7. Checkboxes

  8. Address Fields
    • IP Address Space Input Format
      • w.x.y.z/n - existing address space with prefix
        e.g. 171.64.20.0/24
      • w.x.y/n - existing address space without trailing zeroes
        e.g. 171.64.20/24
      • w.x.y.z - existing address space without prefix
        e.g. 171.64.20.0
      • w.x.y.* - existing address space with trailing zeroes replaced by "*"
        e.g. 171.64.20.*
    • IP Address Input Format
      • Must be in form x.y.y.y where x is a number from 0-255. y is a number from 0-255 or a wildcard. i.e., wildcards are allowed but first octet must be fully defined (e.g., 36 or 171). If y is a wildcard, subsequent octets do not need to be listed- e.g., "36.6.*" is a valid search string
      • Following wildcards are allowed: *, ?, %, _, [ ], [^]
        • * and % are multi-character wildcards
        • _ and ? are single character wildcards
        • [ ] indicates a range of characters
        • [^] indicates NOT in a range of characters
    • Hardware Address
      • Accept lower or uppercase hexadecimal digits (A-F)
      • Ignore punctuation (common ones are colon, dash)
      • Accept regular expressions

  9. Not Searchable- Display Only

    For fields that do not need to be searchable but need to be displayed.

  10. Sort Order- only for ugly mode
    • Sort order will be determined by dropdown menus. The maximum number of fields that can be sorted on is 3. "--" means do not sort on this field. Use listing order if user uses same sort order for multiple fields (user selects '1" for more than 1 field)
    • Sort order refers to vertical sorting. For instance, if Name is the first sort field and IP Address is the second sort field, search results will be listed in alphabetically order. If a Name has multiple IP addresses, those will be sorted in numerical order.
    • The field used to sort does not have to be displayed.

  11. Display Order
    • refers to the order of the vertical columns across the search results page.
    • determined by selection in dropdown menu. User can select a number or "yes" or "no". Order will first be by number. Then "yes" fields are generally displayed in the order found on the full search page. "no" means don't display this field

Table of Search Fields and Types

Search Types

This section covers oddities for each search type. It does not repeat the general information listed above.

  1. Search for Group (RFE)
  2. Search for Domain (RFE)
  3. Search for User
  4. Search for Admin Team (RFE)
  5. Search for Network (RFE)

  6. Search for Node

  7. Search for All Items (RFE)


Output Requirements

Some Sample Outputs: here's node sunia5 which shows both node name associations and interface associations:

#      Name:Node  Name:Alias  Interface#  Address        Active Address  Hardware Address  Receives Mail For  DHCP  DHCP Option             Roaming  
1  peon5   peon5a   1   131.119.75.10  N   dead.beef.1119   abercrombie   Y   filename=interface1   Y   
sunia5   peon6               abs      log-servers=interface1     
sunia5-2   sunia5-2a      131.119.75.12  Y      peon4m            
  sunia5a   2   131.119.75.11  Y   dead.beef.2229   peon5   N   log-servers=interface2  N   
                 peon5m      next-server=interface2     
        131.119.75.13  N      sunia-mx1            
     IPC   131.119.75.14  Y      sunia5-2m            
        131.119.75.15  N      sunia5m            
                 zakm            
                 zathras            


Sample Searches

Group

  1. Groups with something in the comment field. Display: group name, comment. Sort by group.
  2. Groups with spaces in their name. Display: group name. Sort by group.

Domain

  1. Domains not in stanford.edu. Display domain, group. Sort by domain.
  2. Domains in highwire group but not in stanford group. Display domain. Sort by domain.
  3. Domains modified last week. Display domain, Modified When, Modified By. Sort by Modified when.
  4. Domains not created by riepel. Display domain, created by. Sort by Created By.
  5. Domains created before 1/1/2000. Display domain, created when. Sort by Created When.
  6. Domains with non-empty comment fields. Display domain, comment. Sort by domain.
  7. Domains not in the Stanford group. Display domain, group, comment. Sort by group.

User

  1. Users with SystemManagement object rights. Display User, Department. Sort by User.
  2. Users that have left Stanford- report?
  3. Users with All Objects but not All Groups. Display user name, group, department. Sort by group.
  4. Users not in Stanford group with Host object rights. Display username, group. Sort by group.

Admin Team

  1. Teams which "sunia" is a member of. Display: Name, Members, Created By, Created When. Sort by group
  2. Teams with no members. Display: Name, Department, Group, Comment, Created By Sort by Department
  3. Teams created after 1/1/2000 which have a group and a department and comment and were not created by "ginar". Display: Department, Group, Comment, Created By (no name). Sort by Name.

Network

  1. All address spaces. Display: AS, name, AS group. Sort by Name, then AS.
  2. Address spaces in group "Mechanical Engineering". Display: AS, name, Reserves. Sort by name.
  3. Address spaces using dhcp option "d*" that are part of networks in group Networking. Display name, address spaces, dhcp options. Sort by name
  4. Address spaces with a /24 or greater. Display address spaces, name, comment. Sort by network size
  5. Networks not in group Networking. Display name, group, comment, reserves. Sort by group.

Node

  1. All IPCs that are fastpaths (using hardware address first 6 digits 0080d3) that are not in group networking and were modified in the last month. Display: Fastpath name, IP address, group, modifed by, last modified. Sort by fastpath name.
  2. All nodes modified by LNA econway in the month of July 1999. Display: Node name, IP address, department, group. Sort by Department, then IP address
  3. All templates that are in address space 171.64.52/22 but are not in Civil Engineering group. Display: Template name, group, Created By, Created When. Sort by group.
  4. All nodes in building 02-520 which are in Mechanical Engineering department but not in Mechanical Engineering group. Display: Node name, nodetypes, IP address, Make/model, OS, group, Administrator. Sort by group, then nodetype
  5. All nodes in Durand building which are in group Electrical Engineering but not in group Aero/Astro. Display name, IP address, Room. Sort by room.
  6. All nodes that expired on or before June 30th, 1999 that are in rescomp group but not in the Rains apartments. Display: Node name, IP address, Location, expiration date. Sort by Location, then IP address.
  7. All nodes in group LINCS which are not in buildings Birch/Oak, Poplar or Press. Display: node name, IP address, department, location, user. Sort by Department, then IP address.
  8. All nodes modified people who aren't "farrell" that are in the Earth Sciences group. Display: Node name, node type, IP address, modfied by, modified when. Sort by Modified By, then IP address.
  9. All nodes with DHCP turned off that have "ROAM" in the comment field. Display: Node name, IP address. Sort by IP address.
  10. All names starting with "s" in the "stanford.edu" domain that have mxes in stanford.edu that are in the "University Libraries" department. Display: node name, IP address, mx, location. Sort by MX, then location.
  11. All nodes running MacOS (all versions) in buildings in quad 02 that were created within the last 2 years with a comment in the field. Display: Node name, IP address, OS, location, comment. Sort by OS, then location.
  12. All nodes that are made by Apple that run DHCP, are in "stanford.edu", have an alias, have a room, have a user, have an administrator whose name begins with "c" and have an IP address. Display: Node name, alias, IP address, Make/Model. administrator, room. Sort by Make/Model, then administrator.
  13. All nodes with hardware address starting with "0000a380" that are not in 172.2*.*.*. Display: Node name, IP address, Make/Model, OS, location, administrator. Sort by administrator, then location.
  14. All Cisco devices with an OS other than "IOS". Display: Node name, IP address, Make/Model, OS, group. Sort by OS, then group.
  15. All nodes with admin team "CSCDF" that are not in group "Computer Science". Display: node name, IP address, make/model, location, group. Sort by group, then IP address.
  16. All addresses in the "Registrar's Office" department that are not in building Old Union. Display: node name, IP address, location. Sort by location, then IP address.
  17. All nodes in group networking that are not in Pine Hall and are simple nodes and are in 171.64. Display: Node name, IP address, location. Sort by location, then IP.
  18. All nodes in the Medical group starting with "s" or "w" or "m" or "x", in 171.65.*.* which are not in building "1000 Welch Road" which have a room that is not "basement" . Display: Node name, IP address, location, room. Sort by Location, then Room.
  19. All IPCs which have one or more IPC addresses. Display: Node name, IP address, location. Sort by IP address.
  20. All nodes, interfaces, alises, mxes starting with "s" in stanford.edu. Display: Names, name type, IP address. Sort by name.
  21. All nodes starting with "www" that are not in stanford.edu, that were created in the last 2 years. Display: Node name, IP address, Group, Comments. Sort by group, then IP address.
  22. All nodes with Custom Fields. Display: Node name, IP address, custom fields. sort by node name.
  23. All nodes with DHCP options in stanford.edu with IP address in 171.64. Display: Node name, node type, IP address, DHCP options, DHCP on/off, Roaming on/off. Sort by DHCP option, then node type.
  24. All inactive nodes with DHCP on. Display: node name, IP address. Sort by IP address.
  25. All nodes that are advanced but not routers that are not in the networking group. Display: Node name, node type, IP address, make/model, group. Sort by group, then IP address.

All Object Search

  1. All objects in "my groups" for user "jaldrich". Display object name, group, IP address. Sort by object type, object name.
  2. All objects of IP address 171.64.20.* and 172.24.20.*. Display object name, object type, IP address. Sort by IP address.


Sunia's List of Advanced/Bizarre/Useful Searches

* - I think it's already possible given above information 1/24/00

Must-Have Searches for LNAs

Must-Have Searches for gods

Enhancements in Next Version for LNAs

Enhancements in Next Version for gods

Nice to Have Someday
THE END