Expressions can be simple or complex.
| • | A simple expression is the same as a single operand. When you create a search limit, you can select a simple expression like LIBRARY = “MAIN” from the Expression drop-down list to limit search results to items owned by the Main Library. |
| • | A complex expression is two or more operands joined by the AND operator, or the OR operator. When you create a search limit, you can select a complex expression like LIBRARY = “MAIN” OR LIBRARY = “NORTH” in the Expression drop-down list to limit search results to items owned by either the Main Library, or by the North Branch Library. |
In this example of a simple expression, an administrator wants to automatically limit search results to romance novels. In the Operand Builder fields, the administrator selects the search field, operator, and the desired value as follows.
Field: Genre
Operator: =
Value: Romance
The administrator then moves to the Search Limit fields, and does the following:
| • | Gives the search limit an entry code of ROMANCE_NOV. |
| • | Specifies the localized name as Romance Novels, and selects English (United States) as the language for the localized name. |
| • | Selects the operand in the Expression field. |
The Search Limit fields and information look like the following when the administrator finishes creating the search limit.
Entry Code: ROMANCE_NOV
Name: Romance Novels English (United States)
Expression: GENRE = ROMANCE
When the search limit is used, a record will be a match (a search result) if it contains the Genre search field with a value of ROMANCE.
This example of a complex expression is a continuation of the final example in Examples of operands. An administrator wants to make available to patrons a search limit that will limit search results to materials with reading levels from level 4 through level 6. The administrator has already created the following operands using the Operand Builder fields.
READING LEVEL >=”4”
READING LEVEL <=”6”
The administrator moves to the Expression Builder fields, and makes the following selections.
Operand: READING LEVEL >=”4”
Operator: AND
Operand: READING LEVEL <=”6”
The administrator then moves to the Search Limit fields to create the search limit. The administrator does the following.
| • | Gives the search limit an entry code of UPPER_ELEM_LEVELS. |
| • | Specifies the localized name as Show only items for Reading Level 4 through Level 6, and selects English (United States) as the language for the localized name. |
| • | Selects the complex expression in the Expression field. |
The Search Limit fields and information look like the following when the administrator finishes creating the search limit.
Entry Code: UPPER_ELEM_LEVELS
Name: Show only items for Reading Level 4 through Level 6 English (United States)
Expression: READING LEVEL >=”4” AND READING LEVEL <=”6”
When the search limit is used, a record will be a match if it contains a Reading Level field with a value of 4, 5, or 6.
Related topics
Understanding and creating expressions for search limits
Understanding and creating operands for search limits
© 2008-2013 SirsiDynix