Search

The search engine is the fastest and most efficient means of accessing a document. It operates through easy-to-use templates, and the query syntax is intuitive but permits precise targeting. The results list can be navigated easily so as to quickly find the relevant document, and then the specific part of the document that corresponds most closely to your query.

Templates

While navigating on CanLII, you will come across various search templates. The scope of searches possible through each template depends upon its location on the site. For example, on the site's home page, the template enables all CanLII databases to be searched, but on a court or tribunal's presentation page, searches can only target that court or tribunal's decision database. CanLII also provides you with an advanced search template that allows you to refine the scope of your search, such as by including a combination of provinces and territories and certain types of courts or tribunals. As an example, the advanced search template is as follows.

Advanced search template

Each template has numbered fields ranging from 1 to 7, as applicable. The purpose of the numbers is to make the fields easier to read; the numbers should not be seen as steps to be completed. Their content may vary from one template to the next, except for fields 1 and 2, which are always present, always have the same meaning, and to which the same query syntax applies.

[1] Full text – Full text search: in this field, you can type terms that should be found in the body of the text of the document you are seeking.

[2] Statute name / case name / citation / docket number – Citation search: in this field, you can type in information that is usually related to citation. If you are looking for legislative materials, you can enter terms that are found in the title of the statute or regulation or, if you have such information, its year of enactment and chapter number. If you are looking for a decision, you can enter its neutral citation, CanLII citation or the citation of a law report supported by RefLex. You can also enter the docket number or terms that are likely to be in the decisions' name or only part of the document's title, citation or docket number, in order find a series of documents or increase your chances that the results will contain the document you are seeking.

When present, the fields numbered from 3 to 7 are for restricting or expanding the scope of the search query terms entered in the two first fields:

[3] Decision date between (yyyy-mm-dd) – If you are searching a decision database, you can identify a time period within which the decision was rendered. You must use the yyyy-mm-dd format. To enter a specific date, type the same date into both boxes. You can also enter only a month (yyyy-mm) or year (yyyy).

[3]-[7] scope / jurisdictions – You can restrict the scope of your search to certain databases by unchecking the boxes or clicking on the buttons that correspond to the following:

[3] Add associated regulations / enabling statute – On a statute or regulation presentation page, you can extend your search to the associated regulations or the enabling statute, as applicable.

[4] add previous versions – On a province's or territory's statute or regulation presentation page, you can extend your search to versions of the text that were downloaded by CanLII at dates prior to the most recent update.

[5] Add results from federal databases – On the presentation page of a provincial or territorial collection, you can extend your search to the federal collection so as to target all applicable law.

Query Syntax

The query syntax in search template fields 1 and 2 makes simple queries efficient but also allows experienced users to create very precise queries using various operators.

Query Processing

Your query is processed in a flexible manner in order to provide you with all relevant results.

Queries without operators – By default, the search engine processes a space between terms as a logical AND. A query typed without operators will thus return documents that match all the query terms. Moreover, the search engine considers that if a query contains no operators, its adjacent terms might form a phrase, i.e., a meaningful sequence of words; documents that contain such possible phrases will generally be ranked higher in the search results.

Language – The query is launched only in the search index that corresponds to the site's interface. You will therefore get more complete results if you set the template in the language of the document you are seeking. Note that unilingual documents are indexed in both languages.

Exclusion of common words – The syntax ignores many common words, such as definite articles and prepositions, except when such words are placed within quotes, for example, when a phrase is queried.

Stem search – When you perform a full text search in field 1, the search engine not only returns the query terms but also their usual variations (e.g. sentence, sentences, sentenced). You can deactivate this feature by placing your terms within parentheses preceded by the EXACT operator, for example: EXACT(sentenced).

Upper/Lower case – The syntax is case insensitive, that is to say, you can type searched terms in upper or lower case without having any effect on the results. However, the words AND, OR, NOT, ET, OU, NON and EXACT typed in all-upper case are treated as operators.

Accentuated letters – The syntax is not sensitive to diacritical marks (accents, cedilla and diaeresis), so typing protégé will yield the same results as protege, except when the term is used with the EXACT operator, for example: EXACT(protégé).

Special characters – A character other than a letter, digit or white space, e.g., a dash or apostrophe, is considered a generic character, that is to say, the place it occupies in a term will be considered replaceable by any character. If such a character connects two words, the words will be treated as a phrase. For instance, typing seat-belt will allow you to find seat belt as well as seat-belt. However, when a special character is used but does not connect two words, it is simply ignored, for example: $500 is treated as 500.

Punctuation in citations – The syntax is not sensitive to punctuation often found in legal citation acronyms and other abbreviations. This means that you can type such abbreviations with or without punctuation, and the search results will not be affected. For instance, typing [2005] 2 S.C.R. 669 is equivalent to typing 2005 2 SCR 669, and 163 OAC 33 is equivalent to 163 O.A.C. 33. The dot is however recognized when used in a sequence of digits, for example, in 47.2.

Parentheses – When they do not contain operators, parentheses are considered to be generic characters. For instance, typing 3.4(2)(b) also searches for 3.4(2)b and similar variations. If they contain an operator, parentheses are interpreted as modifying the default order of priority of operators.

Invalid query – When a combination of operators does not form a valid query, an error message is displayed. The query will nevertheless be launched with the terms that were typed, but all operators will be ignored. For example, the query section /s 3.4(2)b) is considered an invalid query because the final parenthesis does not correspond to an opening parenthesis, but the query will be launched as if it were section AND "3.4 2 b".

Operators

The following characters and operators allow you to change the default processing of queries.

Wildcard search (*) – When uncertain of the wording of a term or when it might vary, you can use an asterisk (*) as a wildcard character in order to replace zero, one or more characters. For instance, constitution* will return documents containing constitution, constitutional, constitutionality or constitutionally. Similarly, O'Ne* will return documents containing O'Neal, O'Neil or O'Neill.

In order to limit the complexity of requests, the asterisk should be used in a sequence of caracters which represents at most 1024 different words present in CanLII's index. This is why query terms such as ab* will cause a syntax error; there are too many words beginning with ab.

Phrase search ("") – To search for a phrase, you can group words by typing them between quotes, for example: "duty of care". To search for a phrase with exact words – and avoid retrieving variations of the words contained in the phrase – use the EXACT operator: EXACT("duty of care").

Boolean search (AND, OR, NOT) – To perform a search that combines or excludes terms, use the AND, OR and NOT operators, in capital letters, between your query terms (or ET, OU and NON – the operators work in both languages), for example: warranty AND sale OR buy NOT car.

Proximity search (/p, /s, /n) – You can use proximity operators between your search terms in order to find documents containing at least one occurrence of terms that appear in the same paragraph (/p) or sentence (/s), or within n terms from one another (/n). For instance, the query contract /3 onerous will return documents matching at least one occurrence of the term contract separated by three words or less from onerous. Note that proximity operators cannot be used validly with the NOT operator, for example: adoption /s NOT statute.

Priority of operators – Your query is read in a predetermined order of priority that goes as follows:

  • 1. Words containing the wildcard character (*);
  • 2. Phrases placed between quotes ("");
  • 3. Operators placed between parentheses;
  • 4. The EXACT operator;
  • 5. Boolean and proximity operators, in the following order: OR, /n, /s, /p, NOT and AND.

Parentheses allow you to change the order of priority of operators. For instance, the query contract /s sale OR seller is read as: find all documents containing either sale or seller, and then return only documents that also contain at least one appearance of the term contract in the same sentence as the word sale or the word seller. In contrast, the query (contract /s sale) OR seller is interpreted as: retrieve all documents that contain the words contract and sale in the same sentence and also return all documents that contain the word seller.

Operators – Summary table

Operators (in order of priority)

Description

Examples

*

Replaces zero, one or more characters in a word.

mari*uana

" "

Groups words to form a phrase.

"R. v. Douglas"

( )

Gives priority to an operator: EXACT, OR, /n, /s, /p, NOT or AND.

(contract /2 sale) OR seller

EXACT( )

Restricts the query to the exact terms contained within the parentheses by deactivating the stem search (i.e., automatic inclusion of variations).

EXACT(reviewable transaction)

OR or OU

Retrieves documents containing either of the two terms.

city OR municipality

/n

Retrieves documents containing the two terms placed within n terms of one another.

letter /5 credit

/s

Retrieves documents containing both terms in the same sentence.

tax /s income

/p

Retrieves documents containing both terms in the same paragraph.

levy /p probate

NOT, NON or

Retrieves only documents that do not contain the term that follows.

custody NOT child

AND or ET

Retrieves documents that contain all the terms.

permit AND hunting

[No operator]

Retrieves documents that contain all the terms (i.e., it is equivalent to AND). Documents matching the same adjacent terms possibly forming a phrase are ranked first in search results.

privacy access housing unit

Results Consultation

The results list is presented beneath the search template, which facilitates query refinement. When consulting a result from the list, it is easy to navigate between the query terms.

Results List

The following is an example of the first part of a search results list. Letters A to F provide descriptions of the result list elements.

Example of a results list

A The number of results returned by your query allows you to determine whether your search needs to be changed or refined. Please note that no matter how many results are returned, only the first 500 can be consulted.

B Results are sorted by relevance according to CanLII's search algorithm. If decisions are among the results, you can sort them either by date of judgment, beginning by the most recent, or by the frequency of citations to the case by decisions published on CanLII. Statutes and regulations will remain sorted by relevance, after the decisions list.

C For each result, the first line shows the document's title with a hyperlink to the document followed by the rest of the citation and the date of decision, as applicable.

D The second line indicates which database contains the document.

E For each decision, the third line shows five keywords that are frequently mentioned in the decision's text. These keywords are automatically generated based on a computer analysis of the decision and without editorial control, which explains why some keywords may be less relevant.

F When many results are returned from various sections of the same federal legislative text, the second result is indented. When more than two results are returned from the same statute or regulation, you can consult them by clicking on the link "more from this legislation".

Navigation Through Highlighted Terms

Consultation of a document from a search results list is facilitated by coloured highlighting of terms that were in your query. A navigation bar displayed at the top right corner of your browser window allows you to conveniently navigate through terms. The following is an example of the navigation bar.

Example of a highlighted terms navigation bar

You can uncheck terms if you wish to deactivate their highlighting and the navigation function. Note that common words in your query, such as articles and pronouns, are by default unchecked in order to avoid cluttering the document with highlighted words. When you do not need the navigation bar anymore, you can hide it definitively by clicking on the X button in the upper right-hand corner.