PAC CQL Commands and Access Points

This section lists the CQL (Common Query Language) commands and access points you can use to construct custom search filters for Polaris PowerPAC. For more information about this procedure, see Setting Up Search Filters (Limit By). You can also use CQL commands to construct ready-made searches for search categories in Polaris PowerPAC Children’s Edition. For more information about this procedure, see Add a new search target to a category.

The CQL 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 >= stands for the relative operator greater than or equal to.

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

Note:
To see whether fields use keywords or codes, refer to Search Access Point (Field) Codes.

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 the operations to be performed.

Search Text That Includes Operators or Special Characters

To search for text that includes an operator 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.

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-Distance 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. See Search Access Point (Field) Codes.

Example:
KW=“cat” PROX/distance<=5 KW=“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:
KW=“Harry Potter” PROX/distance<10/ordered KW=“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:
KW=“United States” PROX/distance=2 KW=“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

Search Access Point (Field) Codes

Access Point Description

AB

Assigned branch (requires library-specific codes)

AU

Author (keyword)

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

BRSN

Polaris bibliographic record set - record set name

CALL

Call number

CN

Polaris bibliographic record - control 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

ISSN

International Standard Serial Number

KW

Keyword (any field)

LA

Language (see LA (Language) Codes)

LC

Library of Congress classification

LCCN

Library of Congress Control Number

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

OCN

Other system control number (requires library-specific codes)

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

 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.

Note:
You can see a complete list of language codes at the Library of Congress Web site:
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

Atlas atl

Audio book

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 media 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

Mixed materials

mix

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

art

Two-dimensional nonprojected graphic

ngr

Video game vgm

Videorecording

vid

Videotape

vcr

Vinyl vyl

Visual materials

vis