Doing Power Searches

With power searching, you can construct complex, precise searches by writing Common Command Language (CCL) queries. Power searching is a good way to list records that share a combination of very specific characteristics. To construct a power search, you can begin with a basic search expression and then add more search expressions to it, or you can write the entire query.

Note:
You can do complex searches for cataloging records and have Polaris format the information you provide into CCL for you. See Scoping Searches for Bibs and Items.

See also:

Setting Up CCL Queries

CCL queries in the Find Tool consist of one or more search expressions. Each search expression is a search string and a series of symbols and operators specifying the desired search results.

Tip:
You can change the time out for the search from the default of 30 seconds to another length of time by typing TIMEOUT=(number). For example, if you want to search for United States and increase the time out to 60 seconds, type:
KW=United States and TIMEOUT=60

A search expression includes the following components:

Example:
The following query, composed of two search expressions linked by AND, finds the works of author Asimov published in or after 1970:

AU=asimov AND PD >= 1970

where

AU
 and PD are access points (Author and Publication Date)
=, AND, >= are operators
asimov and 1970 are search strings

You can group search expressions with parentheses to direct the order of operations.

Mnemonic Codes for Access Points

When you are creating queries, you must use the mnemonic code, and not the full term, for the following access points:

Note:
Branches and collections are available only with normal searches.

CCL Operators

The following are CCL operators:

Boolean Operators

The Boolean operators AND, OR, and NOT combine search expressions in logical sequences:

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.

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.

You may build a more complex query using the Boolean operators. When using multiple operators in the same query, use parentheses to group the search expressions so that they are done in the correct order, from left to right.

Proximity Operators

The proximity operators N, Nn, W, and Wn specify the relative position of search terms in the search results. Proximity operators are used with a number representing the distance between the two terms (the proximity distance). Adjacent terms have a proximity distance equal to 1, and the default proximity relation is LE (less than or equal to).

If the proximity operator begins with N, it indicates the search terms may be separated by the specified number of words in any order. For example, a power search for KW="United States" N2:EQ KW="Union" searches for records where the phrase United States appears exactly two words before or after the keyword Union.

If the proximity operator begins with W, it indicates the search terms must be within the specified number of words in the specified order. For example, a power search for KW="Harry Potter" W10:LT KW="J.K. Rowling" searches for records where the phrase Harry Potter appears less than 10 words before the phrase J.K. Rowling.

Examples:
AU="james" N AU="joyce"
AU="james" % AU="joyce"

Finds any items with authors that have the names James and Joyce next to each other, such as James Joyce or Joyce James.

Example:
AU="james" N4 AU="joyce"

Finds any items with authors that have the names James within four words of the name Joyce, such as James C. Joyce or Joyce and Roberta James.

Examples:
AU="james" W AU="joyce"
AU="james" ! AU="joyce"

Finds any items written by James Joyce, but ignores items written by Joyce James.

Examples:
AU="james" W4 AU="joyce"
AU="james" !4 AU="joyce"

Finds any items written by James C. Joyce and James Robert Collins Joyce, but ignores items written by Joyce C. James.

Relative Operators

The relative operators include the following mnemonic codes for comparing items:

Operation Mnemonic Code/Relative Operator

Equal to specified item

EQ or =

Not equal to specified item

NE or <>

Less than specified item

LT or <

Less than or equal to specified item

LE or <=

Greater than specified item

GT or >

Greater than or equal to specified item

GE or >=

Equal to specified item

EQ or =

Examples:
- The following example finds items published in or after 1987:
PD GE 1987
- The following example finds items published before 1932 that have the words solar system in any indexed field:
KW=solar system AND PD < 1932

Wildcard Characters

You can use the following special characters to search for character pattern matches to the item description:

Tip:
Enter as much of the base search term as you can because the shorter the base, the more imprecise the search. For example, entering bee* can yield search results of bees, beer, or Beecher.

Quotation Marks in Power Searching

Tip:
You can enclose any search string in quotation marks. If you are not sure whether to enclose the search string in quotation marks, you can always safely use them.

Strings containing the following words and characters must be enclosed in quotation marks if they are used as part of an item description in a CCL search:

Tip:
The number sign (#) is treated as a single-character wildcard and not as the character itself. Therefore, a power search for TI="#*" does not limit the results to records with # in the title. Instead, use an embedded SQL search with 9999 as the Bib-1 Use attribute for ADHOC.

To search for bibliographic records with # in the title, enter the following in the Power Search Criteria box:

[9999]="SELECT RecordID FROM Z3950_AP_BR_TI_S WHERE Term LIKE '#%'"

To search for item records with # in the title, enter the following in the Power Search Criteria box:

[9999]="SELECT RecordID FROM Z3950_AP_IR_TI_S WHERE Term LIKE '#%'"

N

?

N[1-9]

#

%

=

W

<>

W[1-9]

eq

!

gt

and

lt

or

ge

not

le

*

-

&

 

Examples:
- To find the title Bud, Not Buddy, you type the following command:
TI = “bud not buddy”
The string must be enclosed in quotation marks because in a CCL command, not is ordinarily a Boolean operator.

- To find the telephone number 453-7890, you type the following command:
PHONE = “453-7890”
The string must be enclosed in quotation marks because in a CCL command, the hyphen (-) ordinarily separates two values, indicating a range of values between the two.

Power-Searching for Multiple ISBNs

Tip:
If you are pasting the ISBNs from another source (such as a Word document) that uses the curved “smart quote” characters, change the quotation marks to straight quotes in the search command.

The internal limit to the number of search terms you can enter with no parentheses is 10. If you search for multiple ISBNs, you can avoid this limit by placing each ISBN in quotation marks. The example shows the syntax you can use:

Example:
Each number represents an ISBN.
ISBN={"1", "2", "3", "4"}