| Minimum Software Version | 8.18.10 |
| Solution(s) | Cases International ✓ Cases US ✓ Institutions ⨉ Counsel ✓ |
Provides an overview of the Opus 2 search syntax, powered by Lucene Query Language, and explains how to construct simple and advanced search queries to retrieve documents effectively.
Using Search
The Opus 2 search functionality is powered by Lucene, a robust search library that supports advanced indexing and querying. Using Lucene Query Language, users can construct precise search queries to filter and retrieve documents with a high degree of accuracy.
Search queries consist of terms combined with operators. These operators allow users to refine results based on fields, patterns, proximity, ranges, relevance, and logical conditions. This article covers both basic and advanced syntax to help users perform effective searches.
Terms
Queries are made up of terms and operators. There are two types of terms:
- Single terms – Individual words, such as
contract - Phrases – Groups of words enclosed in double quotes, such as
"contract agreement"
Multiple terms can be combined using term modifiers or Boolean operators to create more complex queries.
Fields
By default, searches are performed against the Text field, which searches the content of documents. Users can specify a different field by typing the field name followed by a colon (:).
Example:
"Contract agreement" AND Tags:Review
The field applies only to the term that immediately follows it.
Using wildcard searches
Wildcard searches are useful when only part of a term is known.
Single‑character wildcard (
?)te?tMatches
textandtest.Multi‑character wildcard (
*)contract*Matches
contract,contracts, andcontractor.
Wildcards cannot be used as the first character of a term.
Using fuzzy searches
Fuzzy searches account for spelling variations using editing distance.
Example:
contract~1
Finds closely related terms such as contact or contrast.
An edit distance of 2 broadens the results:
contract~2
Note: Fuzzy and wildcard operators cannot be combined in a single term.
Using proximity searches
Proximity searches find words within a specified distance of each other.
Example:
"contract agreement"~5
Finds documents where contract and agreement appear within five words of each other.
Using range searches
Range searches return documents where field values fall within specified bounds.
Date example:
Date:[2023-01-01 TO 2024-01-01]
Unbounded example:
Date:[2024-01-01 TO *]
Inclusive ranges use square brackets [ ]; exclusive ranges use curly brackets { }.
Boosting terms
Boosting increases the relevance of a term or phrase.
Example:
purchase contract^4
This increases the importance of contract in search results.
Boosting can also be applied to phrases:
"purchase contract"^4
Boolean operators
Boolean logic allows precise control over search results. Operators must be in ALL CAPS.
OR (default)
"unfair dismissal" OR dismissalAND
"contract agreement" AND "John Smith"Must have (
+)+contract agreementMust not have (
-)"contract agreement" -"John Smith"
Grouping
Parentheses control the order of evaluation.
Example:
(purchase OR sale) AND contract
Field grouping
Grouping can also be applied within a specific field.
Example:
"Document Name":(+contract +"John Smith")
Tag example:
Tags:(+Hot -"To review")