Boolean Searches

With a Boolean search, you can do complex, precise searches by typing CQL (Common Query Language) search commands. The search command can include the following parts:

Example: To find the works of author Asimov published in or after 1970, you type the following command:
AU=asimov AND PD >= 1970
AU
specifies the access point Author. The search text for this access point is asimov.
AND is the Boolean operator connecting the two conditions of this search (the author and the date).
PD specifies the access point Publication Date. The search text for this access point is 1970.
The symbol >= is the relative operator greater than or equal to.

If your library offers other databases to search, they are available to select for a Boolean search.

Fields that can be searched with CQL search commands fall into one of three categories:

Operators

Operators link one part of a search command to another, and direct how the parts are related.

Boolean Operators

The Boolean operators And, Or, and Not combine search terms:

Example:
AU=“isaac asimov” AND TI=planets
Finds only the items written by Isaac Asimov that have the word planets in the title.

Example:
AU=“isaac asimov” OR TI=planets
Finds all items written by Isaac Asimov and all items with the word planets in the title by any author, including Asimov.
If you have a number of terms to combine with OR, type the command this way:
AU={list}asimov, dick, ballard, lem, capek{/list}
You can insert as many terms as you need between {list} and {/list}

Example:
AU=“isaac asimov” NOT TI=planets
Finds only those items written by Isaac Asimov that do not have the word planets in the title.

If you use multiple operators in the same search command, use parentheses to group (nest) the operations to be performed.

Example:
(AU=rowling AND TI=potter) NOT (AU=rowling AND TI=phoenix)
Finds items by Rowling with the word Potter in the title, but not titles by Rowling with the word Phoenix in the title.

If you use multiple operators in the same search command but do not group the operations, the operators are processed according to the following precedence (lower values have higher precedence):

Relative Operators

Relative operators are symbols that compare search terms:

Symbol Relative Operation

=

Equal to search term

<>

Not equal to a single search term:
PD <> 1970
For a range of dates, use NOT:
NOT PD = 1970-1980.

>=

Greater than or equal to search term

>

Greater than search term

<=

Less than or equal to search term

<

Less than search term

Example:
PD >= 1987
This example finds items published in or after 1987. PD specifies the publication date access point. See Search Access Point (Field) Codes for access point codes.

Example:
KW=solar system AND PD < 1932
This example finds items published before 1932 that have the words “solar system” in any record field. KW specifies the keyword access point. See Search Access Point (Field) Codes for access point codes.

Proximity Operator

With proximity searching, you specify the allowable distance between two terms, which can be keywords or phrases. The proximity-distance operator is PROX/distance. The proximity-distance is the difference between the positions of the left and right terms. The distance is never negative, and adjacent terms have a proximity-distance equal to 1. You can use the operator with the relative operators < (less than), <= (less than or equal to), = (equals), >= (greater than or equal to), > (greater than), or <> (not equal to).

You can use the following modifiers:

/ordered - The order of the two terms in the search results must be the same as the order of the terms in the query.

/unordered - The order of the two terms does not matter in the search results.

You can use keyword or phrase search access points (such as KW, AU, TI) but the access point must be the same for both terms. If no access point is specified, KW (keyword) is assumed. See Search Access Point (Field) Codes.

Example:
“cat” PROX/distance<=5 “the hat”
Find the keyword cat where it appears less than or equal to 5 words before or after the phrase the hat. That is, between 0 and 4 words exist between the keyword cat and the phrase the hat.

Example:
“Harry Potter” PROX/distance<10/ordered “J. K. Rowling”
Find the phrase Harry Potter where it appears less than 10 words before the phrase J. K. Rowling. That is, between 0 and 8 words must exist between the phrase Harry Potter and the phrase J. K. Rowling, counting from the first word in each phrase.

Example:
“United States” PROX/distance=2 “Union”
Find the phrase United States where it appears exactly 2 words before or after the keyword Union. That is, exactly 1 word must exist between the phrase United States and the keyword Union.

Restrictions on the proximity operator:

Search Text That Includes Operators, Reserved Words, or Special Characters

To search for text that includes an operator or other reserved word, or special characters, as part of the search text, put the text in double quotation marks.

For example, to find the title Bud, Not Buddy, type this command:
TI = “bud not buddy”
Put this text in quotation marks because not is ordinarily a Boolean operator.

As another example, to find the title Tim O'Toole and the Wee Folk, type this command:
TI=“tim o’toole”
Put this text in quotation marks because the apostrophe in the word o’toole is a special character.

The following text must be placed in double quotation marks when used as part of the search text:

Search Access Point (Field) Codes

Use these access point codes to specify what fields to search:

Access Point Description

AB

Assigned branch (requires library-specific codes)

AU

Author

AVAILABILITY

Filters search results to titles that have at least one available item. Type AVAILABILITY > 0. Example: To find Harry Potter titles with at least one available item, type TI = Harry Potter AND AVAILABILITY > 0.The AVAILABILITY access point works only for values greater than 0. (AVAILABILITY = 0 is not valid.)

BRS

Polaris bibliographic record set - control number (requires library-specific number)

BRSN

Polaris bibliographic record set - record set name (requires library-specific name)

CALL

Call number

CODEN

Identifier for scientific and technical periodicals

COL

Collection (requires library-specific codes)

DD

Dewey classification

GENRE

Genre (keyword)

GOV

Superintendent of Documents classification number for government documents

ISBN

International Standard Book Number. Type the wildcard character (*) at the beginning and end of the number you enter for best results.

ISSN

International Standard Serial Number. Type the wildcard character (*) at the beginning and end of the number you enter for best results.

KW

Keyword (any field) (keyword)

LA

Language (see LA (Language) Codes)

LC

Library of Congress classification

LCCN

Library of Congress Control Number. Type the wildcard character (*) at the beginning and end of the number you enter for best results.

MAT

Material type of physical items (requires library-specific codes)

NAL

National Agricultural Library classification

NLC

National Library of Canada classification

NLM

National Library of Medicine classification

NOTE

General notes (keyword)

OCLC

Online Computer Library Center (OCLC) control number. Type the wildcard character (*) at the beginning and end of the number you enter for best results.

OCN

Other system control number (requires library-specific codes). Type the wildcard character (*) at the beginning and end of the number you enter for best results.

OWN

Record owner (requires library-specific codes)

PD

Publication date

PN

Publisher’s number

PUB

Publisher (keyword)

SE

Series (keyword)

STATB

Record status (requires library-specific codes)

STRN

Standard Technical Report Number

SU

Subject (keyword)

TA

Target audience (see TA (Target Audience) Codes)

TI

Title (keyword)

TOM

Format/Type of Material (see TOM (Format/Type of Material) Codes)

UDC

Universal Decimal classification

UPC

Universal Price Code number. Type the wildcard character (*) at the beginning and end of the number you enter for best results.

LA (Language) Codes

These are some common codes to use with the language access point (LA) in a Boolean (CQL) search. Use the code, not the language name. For example, to specify English, type LA=ENG.

Tip: You can see a complete list of language codes at the Library of Congress website: http://www.loc.gov/marc/languages

Language Code

Arabic

ARA

Bosnian

BOS

Chinese

CHI

Czech

CZE

Danish

DAN

Dutch

DUT

English

ENG

French

FRE

German

GER

Modern Greek

GRE

Hebrew

HEB

Hindi

HIN

Italian

ITA

Japanese

JPN

Korean

KOR

Latin

LAT

Multiple Languages

MUL

Polish

POL

Portuguese

POR

Romanian

RUM

Russian

RUS

Serbian

SCC

Sign

SGN

Spanish

SPA

Ukrainian

UKR

Vietnamese

VIE

Yiddish

YID

TA (Target Audience) Codes

Use these codes with the target audience (TA) access point in a Boolean (CQL) search. Use the code, not the target audience name. For example, to specify a preschool audience, type TA=a.

Note: Not all bibliographic records include target audience information.

Target Audience Code

Preschool

a

Primary school

b

Elementary and junior high school

c

Secondary (senior high) school

d

Adult

e

Specialized

f

General

g

Juvenile

j

TOM (Format/Type of Material) Codes

Use these codes with the Type of Material access point (TOM) in a Boolean (CQL) search. Use the format/type of material code, not the name. For example, to specify DVDs, type TOM=DVD.

Format/Type of Material

Code

Abstract

abs

Archival/mixed materials mix
Atlas atl

Audio books

abk

Audio book on cassette abt
Audio book on CD abc

Blu-Ray Disc

brd

Blu-Ray + DVD bdv

Book

bks

Book + Cassette

bcs

Book + CD

bcd

Book + DVD bkv

Braille

brl

Cartographic material

cmt

Digital collection

dmc

DVD

dvd

EAudioBook

aeb

Ebooks ebk

Electronic resources

elr

Emagazine emg

Globe

glb

Kit

kit

Large print

lpt

Manuscript cartographic material

mcm

Manuscript material

mss

Manuscript music

mmu

Map

map

Microform

mic

Motion picture

mot

Music CD

mcd

Musical sound recording

msr

Newspaper

new

Nonmusical sound recording

nsr

Periodical

per

Printed cartographic material

pcm

Printed music

pmu

Printed or manuscript music

mus

Projected medium

pgr

Serial

ser

Sound recording

rec

Streaming music stm
Streaming video stv

Three-dimensional object (artifact)

art

Two-dimensional nonprojected graphic

ngr

Video game vgm

Videorecording

vid

Videotape

vcr

Vinyl vyl

Visual materials

vis

Do a Boolean search by typing a CQL command

To search by typing a Common Query Language (CQL) command

Note: For more information about CQL commands, see Operators, Search Text That Includes Operators or Special Characters, and Search Access Point (Field) Codes.

  1. Select Boolean from the Search menu.
  2. Type the CQL command in the Boolean search for box, keeping the following tips in mind:
  3. Example:
    The following command finds works of the author Asimov which have titles with the word foundation, except audio books published after 1990:
    (AU=asimov AND TI=foundation) NOT (TOM=abk and PD>1990)
    Terms inside the parentheses are processed first, then the entire command.

    Example:
    To find the title Bud, Not Buddy, type the following command:
    TI = “bud not buddy”

  4. If you want to set additional limits, follow these steps:
  5. Important: If you type your search term and then select more search options before clicking or tapping the search icon , you will need to re-type your search term.

    1. Select More Search Options. The search options window opens.
    2. Select the settings you want. On a desktop computer, to select several consecutive items in a list, hold down the SHIFT key as you select the items. To select several items that are not listed together, hold down the CTRL key as you select the items. On a tablet or smart phone, you can select multiple items but the method depends on your device. You can also exclude items from a search. Select them from the appropriate list, and select the Exclude box below the list.

    Note: Detailed material types are defined by the library for the physical items the library owns. The formats in the Limit by box on the search bar refer to general formats and types of materials associated with title entries in the catalog. You can limit a search by format or detailed material type, but not both. If you selected a format in the Limit by box when you set up your search, your format choice is canceled when you set a material type.

  6. Select Set Search Options. The search options window closes and the search bar displays a highlighted message that options have been set. To change them, select the Change link in the highlighted Options set message, set new values and select Set Search Options. Then do a new search. (The previous search, if any, is automatically done again using your new options settings.)

To reset the search options to their original values, select the Clear link in the highlighted Options set message. The search is done again, using the original values.

Important: Search options retain their settings until you reset them or go to the home page.

  • To search a database other than the library’s catalog, or select multiple databases to search:
    1. Select Select Databases. The Select Databases window opens with the library's default search databases (the local database and remote databases) selected. If you do not want to search the local catalog along with the remote databases, select the check box next to the local database to clear the check box.
    2. Select the remote databases. If your library has organized the databases into categories, you can select a category, and the remote databases under that category are selected.
    3. Select Set Databases to save your selections. The window closes. (The previous search, if any, is automatically done again using your new database settings.) Your selections remain until you reset them. To reset the search databases to the library's default databases, click or tap Clear.
  • Click or tap the search icon . If the search is successful, you see your search results. If no matches are found, you see a message.
  • If you selected remote databases to search, a status bar indicates how many results were retrieved and how many results are pending. To load the remainder of the results, select Add Pending Results. You can select Search Status to see the number of results for all the selected databases. If you have selected or entered a search Limit by option that a remote database cannot use, results from this database are returned based on the basic search terms you entered, and a message indicates that the limiters were not used in the remote database search.

  • To see more information about a title in your search results list, select the title or cover image.
  • To filter your search results or do related searches, select a Narrow or Related option at the side or bottom of the page.