Specifying Search Criteria
When you create a review file, append records to an existing review file, rerun a search query, or save a new search, you must specify search criteria for the query that defines the records added to the list. You enter search criteria in a query builder.
Create Lists offers three options:
- Classic (default)
- The Classic query builder (also referred to as the "Classic editor") lets you specify the search criteria for your review file using legacy methods.
- Enhanced
- The Enhanced query builder (also referred to as the "Enhanced editor") lets you specify the search criteria for your review file using an editor with enhanced capabilities. For the most part, building a query in the Enhanced editor follows the same logic as the Classic editor. The same data considerations described in the Classic editor task descriptions apply to your work in the Enhanced editor.
- JSON
- The JSON query builder lets you create a query using JavaScript Object Notation (JSON). You can build a query directly in the editing window or load an existing JSON text file.
The Create Lists task descriptions found in this topic are based on the default Classic query builder. There are some differences from the Classic version in the Enhanced query builder. The differences are documented in the topic Enhanced query builder.
Create Lists Settings Options
- If your library's database is scoped, you can set the Create Lists function to do one of the following when a user has an assigned scope:
- Retrieve all records in the database, regardless of their scope
- Restrict the retrieved records to those within the current login's scope
- Offer a Use scoped range check box allowing the user to select a scoped or non-scoped results set
See the Create BOOLEAN lists: scope during range database option in Set System Options for information on setting this option.
- If your library uses 880 fields to store romanized and vernacular characters in your database, select the Include equivalent 880s option in the Create Lists Settings to include both main fields and equivalent 880 fields in searches. This setting also applies to sorting, listing, and exporting in review files.
Specifying Basic Search Criteria
To specify basic search criteria:
- From the drop-down list of record types, select the record type to store.
If you are changing an existing search query, the system warns you if the record type you selected is incompatible with one or more fields specified (for example, "Field types <CHECKIN> are not valid for this record type").
Holdings Records
For holdings records, you can choose to store only the holdings record or both the holdings record and its associated checkin cards. If you choose the latter, you can save the data from each box in the checkin card separately. This allows the system to output the box data when listing the review file.
Including Item and Holdings Record Call Numbers
If the Look up call numbers option is checked in the Create Lists Settings, you can include call numbers from item and holdings records in your search criteria. When you select this option, the system retrieves the call number from the parent record if an item or holdings record has no call number.
The system searches for call numbers in the following order:
- The item record HOLDING (h852) field
- The item record CALL NUMBER (c) field
- The bibliographic record CALL NUMBER (c) field
When you search based on call numbers using the Look up call numbers option, all subsequent actions on the review file also uses call numbers as described above. For example, if you use this option to generate the original review file, the review file also uses the call number to Sort and List the records within the file.
- From the drop-down menu, specify the range, review file, index, or advanced syntax to search.
If you are searching on a range of records, Create Lists automatically enters the first record in your system in the Start box and a wildcard as the ending record number in the Stop box. With the wildcard setting, the system searches to the end of the database, even if new records have been added since the search criteria were set up.
To search a different range, enter record numbers in the Start and Stop boxes, including the record type indicator (for example, "b" for bibliographic, "i" for item, and so on).
- In the search criteria table, enter the record type to search. The record types offered depend on the record type indicator you entered in step 2.
Registered and Waitlisted Patron Record Types
If you have Program Registration, Sierra offers two additional types of patron records for searching: registered and waitlisted. Registered and waitlisted refer to regular patron records linked to section records where the patron is either registered or waitlisted for a program. These choices are only available for Create Lists queries storing patron, program, and section records.
- Enter a field. Valid fields include fixed-length and variable-length data fields and certain other fields, depending on the record type.
- Enter a field's code to view a list of valid fixed-length and variable-length fields for the selected record type.
- Press Enter when the field you want is highlighted. Alternatively, double-click the Field cell to open a dialog box showing all the fields available for the record type you selected.
- Click the field you want, and then click OK.
If you click ! MARC Tag, the system provides a prompt indicating what to enter:
MARC TAG tttii|ssss
ttt | 3 numbers for the MARC tag |
ii | up to 2 numbers or spaces for the indicators (optional) |
|ssss | up to 4 subfields indicated by the '|' (optional) |
You must enter the MARC tag. However, you can omit the subfields or indicators. For example, enter "130" to instruct the system to look in MARC tag 130, including any indicators and all subfields.
A question mark, "?", can appear in any position in the MARC tag or indicators as a wild card. For example, if you enter "24?", the system looks for the data in all MARC tags in the "240"s, that is, 240, 241, 242, and so on.
Special Fields
You can search specific subfields of the MARC leader, 006, 007, or 008 fields in authority, bibliographic, and holdings (checkin) records.
You can search for records in which a special field does or does not exist.
You can also search the contents of a variety of record property fields, depending on the chosen record type:
- Select a condition. The available conditions appear in Using Relational Operators.
- Enter a value in the Value A cell, or double-click the cell for a list of options. Double-clicking the Value A cell does not always result in a list of options, even if your library has specified a limited list of options for a field. For example, Create Lists does not display a list of options for the LANG PREF fixed-length field in a patron record. For a date or fixed-length field, enter a valid value.
Call Number Values
If your library uses more than one call number indexing scheme, you must enter the normalized form of the call numbers in the Value A and Value B cells for searches on the call number field. See Using Call Numbers in Searches for detailed examples. For more information on how call numbers are normalized, see Call Number Normalization.
- If you selected the Between or Not within condition, enter a second value in the Value B cell.
- Click Search, or specify additional search terms.
Specifying Additional Search Terms
You can use AND, OR, and (in Sierra 5.2 and later) AND NOT operators to link additional search terms to existing terms. The maximum number of query terms is 100.
You must group multiple search sequences to ensure that Sierra returns the results that you want. Ungrouped searches are prone to ambiguous interpretation. Although the search might run, the results might not match what you want.
For example, consider the interpretation of "black and white or gray" versus either "black and (white or gray)" or "(black and white) or gray". With grouping, even a more complex search such as "((black or red) and white) or gray" can be interpreted clearly, and you can be confident that you are getting the records you want.
The AND NOT operator negates the conditions of that search sequence. If you negate grouped searches, you negate all the conditions as well as the logical connectors.
To specify additional search terms:
- Specify your search criteria for the first term.
- Do one of the following:
- To add a search term to the end of the search term list, click Append Line .
- To add a search term before the selected term, click Insert Line. The system searches for terms in the order that they appear in the table.
- To duplicate an existing line, select the search term, and click Duplicate. The system adds the duplicated line at the end of the existing search terms.
- In the Operator cell of the new search term, select an operator. The Operator value defaults to AND.
- Specify the criteria for the new search term.
- To continue adding terms, repeat the process beginning with step 2.
- Group the search terms as appropriate.
- Click Search.
Saving the Current Search Strategy
To turn your search criteria for a review file into a saved search:
- Specify your search criteria.
- Click Save or Save As. A dialog box opens.
- (Optional) Select the Template check box if you want to save your search criteria as a saved search template.
- (Optional) Select the Include Record Information check box to include the specified search range or review file as part of the saved search or template.
- Enter a name for the saved search, or select a name from the list, and click Save.
Incorporating Saved Searches
You can incorporate a previously saved search when you specify your search criteria:
- From the drop-down list of record types, select the record type to store.
Selecting a Record Type
Sierra can run a saved search on any stored record type. Ensure that you select a record type that is appropriate for the saved search.
- In the drop-down menu, specify the range, review file, index, or advanced syntax to search.
- Click Retrieve Saved Query. Sierra displays the list of saved queries. Note that the retrieved query overwrites any existing search criteria.
- Select one of the queries by selecting its row and clicking Select. When you select a query's row, its search criteria appear in the top portion of the window.
- Add more search terms, or click Search.
Incorporating a Review File's Search Strategy
You can incorporate the search strategy used in an existing review file when you specify your search criteria:
- From the drop-down list of record types, select the record type to store.
- Click Use Existing Search. Sierra displays the list of review files. The retrieved search strategy overwrites any existing search criteria.
- Select one of the queries by selecting its row, and click Use. When you select a query's row, its search criteria appear in the top portion of the window.
- The range of the original search is included in the copied criteria. To refresh the record number range so that it reflects the currently available range, change the Range drop-down menu to Review and then back to Range again.
- Add more search terms, or click Search.
Grouping Search Terms
You can create search criteria hierarchies by grouping your search terms.
To group search terms:
- Select two or more rows to create a group by clicking to highlight the rows. Terms that belong to a group must be adjacent.
- Click Group. Sierra places parentheses around the search terms you selected.
Ungrouping Search Terms
To ungroup search terms:
- Select the grouped rows.
- Click Ungroup. Sierra removes the parentheses around the search terms.
Deleting Search Terms
To remove a search term:
- Select the row or rows of the terms you want to remove.
- Click Delete to remove the selected rows, or Clear All to remove all search terms for the current search.