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:
• The text for which you are searching
• The access points (fields) you want to search; for example, author or title (see Search Access Point (Field) Codes)
• Operators (connectors) that link one part of the search with another (see Operators)
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.
Operators link one part of a search command to another, and direct how the parts are related.
The Boolean operators And, Or, and Not combine search terms:
• And - A record must match both the term before and the term after the operator to be included in the search results.
Example:
AU=isaac asimov AND TI=planets
Finds only the items written by Isaac Asimov that have the
word planets in the title.
• Or - A record can match either the term before or the term after the operator, or both, to be included in the search results.
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}
• Not - A record must match the term before the operator, but not the term after the operator, to be included in the search results.
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):
• PROX = 1 (see Proximity Operator)
• AND = 2
• OR = 3
• NOT = 4
Relative operators are symbols that compare search terms:
Symbol |
Relative Operation |
= |
Equal to search term |
<> |
Not equal to a single search term: |
>= |
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.
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:
• The proximity operator does not support nested
Boolean expressions in either the left or right terms. For example,
((Dog OR Cat) PROX/distance=5 Food) PROX/distance=6
Kennel is not supported.
• The maximum proximity-distance is 1024. If the proximity-distance in the query is greater than 1024, the search process changes it to 1024.
• The total maximum number of keywords in a proximity expression is 16. That is, the number of keywords on the left side of the proximity operator plus the number of keywords on the right side of the proximity operator is limited to 16. If a proximity expression contains more than 16 words, then the proximity operator will be ignored but up to the first 16 words on the left and the right will be checked for adjacency.
• The keyword or phrase access point (such as KW, AU,
TI) used in the left and right terms
must be the same. For example, the query
SU=HARRY PROX/distance<=5 AU=POTTER
is not supported and will produce an Unsupported
search error.
• The left and right terms for each proximity operator
must be a keyword or phrase and not a Boolean expression, but there is
no limit to the number of proximity operators in a query. For example,
this query is valid:
(AU=“J. K.” PROX/distance<10 AU=“Rowling”)
AND (TI=“Conversations With” PROX/distance<10 TI=“Rowling”)
AND MAT=BKS
Note:
The Boolean search field in Polaris PowerPAC does not limit
the number of characters you can enter, but to see long queries, you
may have to use the arrow keys on your keyboard.
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.
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 |
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) |
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 |
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 |
|
PN |
Publisher’s number |
PUB |
Publisher |
SE |
Series |
STATB |
Record status (requires library-specific codes) |
STRN |
Standard Technical Report Number |
SU |
Subject |
TA |
Target audience (see TA (Target Audience) Codes) |
TI |
Title |
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. |
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 |
Language |
Code |
Arabic |
ARA |
Korean |
KOR |
Bosnian |
BOS |
Latin |
LAT |
Chinese |
CHI |
Multiple Languages |
MUL |
Czech |
CZE |
Polish |
POL |
Danish |
DAN |
Portuguese |
POR |
Dutch |
DUT |
Romanian |
RUM |
English |
ENG |
Russian |
RUS |
French |
FRE |
Serbian |
SCC |
German |
GER |
Sign |
SGN |
Modern Greek |
GRE |
Spanish |
SPA |
Hebrew |
HEB |
Ukrainian |
UKR |
Hindi |
HIN |
Vietnamese |
VIE |
Italian |
ITA |
Yiddish |
YID |
Japanese |
JPN |
|
|
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 |
Format/Type of Material |
Code |
Abstract |
abs |
Microform |
mic |
Audio books |
abk |
Mixed materials |
mix |
AudioEbook |
aeb |
Motion picture |
mot |
Blu-Ray Disc |
brd |
Music CD |
mcd |
Book + Cassette |
bcs |
Musical sound recording |
msr |
Book + CD |
bcd |
Newspaper |
new |
Book |
bks |
Nonmusical sound recording |
nsr |
Braille |
brl |
Periodical |
per |
Cartographic material |
cmt |
Printed cartographic material |
pcm |
Digital media collection |
dmc |
Printed music |
pmu |
DVD |
dvd |
Printed or manuscript music |
mus |
Ebooks |
ebk |
Projected medium |
pgr |
Electronic resources |
elr |
Serial |
ser |
Globe |
glb |
Sound recording |
rec |
Kit |
kit |
Three-dimensional object |
art |
Large print |
lpt |
Two-dimensional nonprojected graphic |
ngr |
Manuscript cartographic material |
mcm |
Videorecording |
vid |
Manuscript material |
mss |
Videotape |
vcr |
Manuscript music |
mmu |
Visual materials |
vis |
Map |
map |
|
|
Do a Boolean search by typing a CQL command
Follow these steps 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:
• Letter case is ignored.
• You can type a part of a word and use a wildcard character. The wildcard character asterisk (*) represents the rest of the word. For example, if you type King*, the results include words such as King, Kingsley, and Kingford. The question mark (?) represents exactly one character. For example, wom?n finds woman and women. If the question mark occurs at the end of a word, it does not act as a wildcard character, so you can find titles like what color is your parachute? Also, if you type a backslash character \ before any wildcard character, the wildcard character is treated as text.
• Use parentheses to group search terms.
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.
• To include text that is ordinarily ignored, such as punctuation or Boolean command words in the search text, place the search text in quotation marks.
Example:
To find the title Bud, Not Buddy,
type the following command:
TI = “bud not buddy”
3. If you want to set additional limits, follow these steps:
a) Click More Search Options.
b) Select the settings you want.
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. You can also exclude items from a search. Select them from the appropriate list, and click 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.
c) Click Set Search Options, and click Close to close the options window.
The search bar displays a highlighted message that options have been set. To change them, click the Change link in the highlighted Options have been set message, set new values and click Set Search Options. Then do a new search.
To reset the search options to their original values, click the Reset link in the highlighted Options have been 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. The highlighted message Options
have been set on the search bar indicates that search options
are set to values different from the default values.
4. To search a database other than the library’s catalog, or select multiple databases to search:
a) Click Select Databases and check the databases you want to search.
b) Click Set Databases.
c) Click Close.
Your selections remain until you reset them. To reset the search databases, click Select Databases again. Then click Reset and Close.
5. Click Go.
• If the search is successful, you see your search results.
• If no matches are found, you see a message. You may also see a Did you mean suggestion. You can click the suggestion to search for the suggested term.
6. To see more information about a title in your search results list, click the title or cover image.
7. To filter your search results or do related searches, click a Narrow or Related option at the side of the page.