Syntax Errors


If search operators or field names are not used correctly on the Search screen, Justis may not be able to process your search query, and will display an error message and a few suggestions. Syntax errors can be caused by:

Problems with parentheses

There must be equal numbers of opening and closing parentheses in a search query, so the following will generate a syntax error:

((cats and dogs) or pets

Sets of parentheses must not overlap, so the following will generate a syntax error:

(cats and dogs() or pets) and damage

Parentheses must not interfere with the search logic, so the following will generate a syntax error because the AND operator is not being used correctly:

cats (and dogs) or pets

Problems with brackets

Brackets are used to enclose parts of a search query that are to be restricted to a particular field, and there must be equal numbers of opening and closing brackets. Search queries that include brackets (such as neutral citations and publication references of case reports) must be enclosed in double quotes. The following queries will generate syntax errors:

Subject[sea and sand
Subject[sea and sand and Year[1997]
[2002] EWCA Civ 621
[1999] 2 AC 554

TIP – the proper place to search for a case report by its publication reference is the Citation field on the Search In Cases screen, which does not generate syntax errors.

You must not enclose a field name within brackets, so the following will also generate a syntax error, even though it has equal numbers of opening and closing brackets:

Subject[sea and sand and Year[1997]]

Problems with field names

If you make a typing error while entering a field name you will get a syntax error:

Subjrt["health and safety"]

Problems with dates

If you enter an invalid date (for example 31st September) while entering a date range search, you will get a syntax error:

Update_Date[from 20061101 to 20061131]

Problems with operators

Some of the Boolean, date and proximity search operators will produce syntax errors if they are used at the start or end of a phrase that is not enclosed in double quotes:

and thereafter
“and” is a Boolean operator for combining search terms

within England
“within” is a proximity operator

Problems with quotation marks

Quotation marks are used to mark the start and end of phrases in your search, and so there must not be an odd number of them. The following searches will generate a syntax error:

bail and "open prison

bail and open prison"


syntax.html; last updated 6th October 2006
Copyright © 2006 Justis Publishing Limited

Contents Index Back Forward Close Top Contents Close