Top Navigation Bar


Search Operators


The Justis search language provides a powerful but simple way to combine words and/or phrases on the Search screen to retrieve the records you require. Search operators are used to combine and exclude search terms. Wild cards allow different spellings and word stems to be used in a single search. Fuzzy searching finds words that are similar to the one you specify, using more variations than are possible with wild cards. Parentheses ensure that multiple search terms are combined in a logical order. Brackets restrict searches to a specified field. If you do not use operators correctly, you may see a message about a syntax error.

Boolean operators

Boolean operators combine and exclude terms in a particular way. The three main operators are “and”, “or”, and “not”. Each operator can also be represented by a symbol that works in the same way.

Operator Symbol Example Meaning
and & A and B Documents must contain both A and B
or | A or B Documents can contain either A or B or both
not ! A not B Documents must contain A and must not contain B

The “and” operator is useful if you need to narrow a search. If you type 2 or more adjacent words, then the search engine assumes that you want to retrieve documents that contain all of the words, and behaves as if you had typed “and” between the words. This means that the following searches will produce identical results:

parole open prison
parole and open and prison

Please note that this has changed from the previous versions of Justis, where adjacent words were searched as a phrase. Phrases must now be enclosed in double quotation marks.

The “or” operator widens a search so must be used with care.

The “not” operator can be useful for narrowing a search, but must be used with caution because some useful records may include a passing reference to a term you exclude.

When more than one operator is present in a query string, they are applied in the order not, and, or. You can modify this order using parentheses.

When you use the individual fields on the Search In screens, an AND operator is automatically used between fields. If you need to use OR or NOT operators between fields, you can do this in the Full Text box on the Search In screens or on the Quick Search screen.

Parentheses (precedence of operators)

Use parentheses to define the logical order in which a multiple-term query is performed. For example, to search for documents about the smuggling of either alcohol or tobacco, you could use this search:

smuggling and (alcohol or tobacco)

Without the parentheses, Justis would find (a) all documents about the smuggling of alcohol and (b) all documents about tobacco. These two searches would give exactly the same results:

(smuggling and alcohol) or tobacco
smuggling and alcohol or tobacco

When you use multiple operators, it is generally easier and more predictable to use parentheses rather than try to work out the precedence of the operators.

You can use one set of parentheses inside another set; i.e. nested parentheses, with Boolean operators:

((heroin and white and powder) or (cannabis and resin)) and (drugs and misuse)

Please note that nested parentheses can not be used with proximity operators.

Phrase searching

To search for a phrase, enclose it in double quotes, using wild cards if appropriate, for example:

"grievous bodily harm"
"illegal immigr*"

Please note that this has changed from the previous versions of Justis, where adjacent words were automatically searched as a phrase. Phrases must now be enclosed in double quotation marks.

Phrases that start or end with an operator

As with all phrases, a phrase that starts or ends with an operator must be enclosed in double quotation marks; this tells Justis to treat the operator as a normal word.

"and thereafter"

If you omit the quotation marks, Justis will give a syntax error message for some operators. For example, when “and” is used as an operator it requires a word before and after it.

Phrases with an operator in the middle

As with all phrases, a phrase that contains an operator in the middle must be enclosed in double quotation marks. For example:

"health and safety"

includes the word “and”, which is a Boolean operator. If you omit the quotation marks, Justis will retrieve all documents that contain both the word “health” and the word “safety”.

Proximity operators

Proximity operators allow you to search for 2 words within a specified distance of each other (the distance is measured by the number of words). Use proximity operators to narrow a search, but with greater precision than the “and” operator. In order to be retrieved, not only must the documents contain both terms, but the terms must occur within a certain distance of each other.

smuggling within 20 of (alcohol or tobacco)

Example Meaning
A within 5 of B A must be within 5 words of B
A near B A must be within 10 words of B. It is the same as A within 10 of B

Proximity operators are very useful when searching for phrases, especially when a document may have been translated from another language. For example, “product liability” may have been translated as “liability for the product”. To find all mentions of the phrase, you should search for "product near liability" or "product within 3 of liability".

The “near” operator is fixed at 10 words.

You can use a short form of “within of”:

A w/25 B

You do not need to use proximity operators to search for words that occur within the same field – simply type the words into the text box for the appropriate field on the Search In screen (optionally separated by an AND operator).

Searching for words in the same field

However, you can use proximity operators to find words with a specified distance of each other in the same field; this can be useful for long fields such as Judgment.

You can also search for words in the same field as part of a complex expression entered on the Quick Search screen or in the Full Text search box. Type the name of the field, followed immediately by the search terms inside square brackets.

Free text searching for words in the same field

Date searching

Most Justis databases contain date information in a format that allows you to search for a range of dates.

The DATE operators are:

Operator Symbol Definition
BEFORE < Before the date
AFTER > After the date
ON = On the date
FROM   Range start (use with TO)
TO   Range end (use with FROM)

Dates can only be searched for within a specific date field, e.g. Date of Publication in CELEX, Year in most of the case law and statute law databases, and Update Date in nearly all databases. If you were looking for documents within a range of dates your search would look something like the following:

from 1995 to 1997
before 1984 or after 1996
after 1/3/97
on jan 26 98

The formats that you can use for date searching include:

Day first Month first Year first
19-8-2002
19-08-2002
19/8/2002
19/08/2002
19 aug 2002
19 Aug 2002
19 Aug. 2002
19 august 2002
19 August 2002
aug 19 2002
Aug 19 2002
Aug. 19 2002
august 19 2002
August 19 2002
August 19, 2002
2002-8-19
2002-08-19
2002/8/19
2002/08/19
20020819

Names of months can be in full, or 3-letter abbreviations (with or without a full stop), with or without an initial capital. Dates that begin with the names of months can optionally have a comma after the day.

Ambiguous dates such as 6/7/2002 are assumed to use the British day-first format, not the American month-first format, so the example would be interpreted as 6th July 2002, not 7th June 2002.

You can combine Date searches with other types of searches, for example:

Using date operators

You can choose whether or not specified ranges are inclusive of both dates, i.e. the search will include the start and end dates that you type in.

Refer to the Help for the date fields of your chosen database to find out whether date range searching is available.


See also:


Bottom Navigation Bar


operators.html; last updated 15th November 2007
Copyright © 2006–2007 Justis Publishing Limited


Print

Contents Index Back Forward Close Top Contents Close