CQL syntax rule
Text search syntax in CQL: phrases, wildcards, fuzzy
The contains operator (~) takes a search string, not just a value. Inside that string you can use phrases, wildcards, fuzzy matching and a few more operators. The Atlassian page covers phrases, wildcards and fuzzy searches; the rest below was found by running queries.
Syntax
text ~ "word1 word2"
text ~ "\"exact phrase\""
title ~ "te?t" or title ~ "win*"
title ~ "roam~"
Arguments
| Argument | What it does | Optional |
|---|---|---|
Single term | One word. Several words in one string must all appear, in any order. | no |
Phrase | Words wrapped in escaped double quotes inside the string. They must appear together in that order. | no |
? and * | ? replaces one character, * replaces zero or more. | no |
~ after a word | Fuzzy match: finds words with a similar spelling. | no |
Works with
- Fields: text, title and the other text fields that accept ~ (see the contains operator).
- Operators: only ~ and !~ take a search string.
- Not with: a * or ? as the first character of a term, which the documentation says is not allowed.
Examples
text ~ "incident response"Single terms: pages that contain both words in any order, such as runbooks and policies that mention an incident process.
Run on Confluence Cloud on .
text ~ "\"incident response\""A phrase: only pages that contain the two words next to each other in that order.
Run on Confluence Cloud on .
title ~ "run*"A multiple-character wildcard: titles with a word that starts with run, such as runbook.
Run on Confluence Cloud on .
title ~ "chec?out"A single-character wildcard: one unknown letter in the middle of a word.
Run on Confluence Cloud on .
title ~ "chekout~"Fuzzy search: finds the title that contains checkout although the word is misspelled.
Run on Confluence Cloud on .
title ~ "\"checkout notes\"~2"Proximity: the two words may be up to two words apart. This is not on the Atlassian page, but it runs.
Run on Confluence Cloud on .
title ~ "runbook -onboarding" AND space = SDExclude a term with a minus sign and combine the search with another field.
Run on Confluence Cloud on .
Pitfalls
- Without escaped quotes the words are matched separately.
title ~ "company handbook"andtitle ~ "handbook company"find the same page, buttitle ~ "\"handbook company\""finds nothing (checked on Confluence Cloud, November 2026). Use the escaped form when the order matters. - A leading wildcard does not error, it just finds nothing.
title ~ "*ncident"andtitle ~ "?ncident"run and match no pages, whiletitle ~ "incid*"finds the Incident page. Put the fixed letters first. - Fuzzy matching needs the tilde.
title ~ "handbok"finds nothing,title ~ "handbok~"finds the handbook page. A tilde followed by a number after a quoted phrase is a proximity search, not a fuzzy one. - A boost such as
title ~ "handbook^2"is not supported: the query runs and matches nothing, even when the word exists. A hyphen inside the string is an operator too, sotitle ~ "Template - Meeting notes"finds nothing until it is written as"Template \\- Meeting notes"(checked on Confluence Cloud, November 2026).
Questions and answers
Is ~ case sensitive in CQL?
No. title ~ "RUNBOOK" finds the same pages as title ~ "runbook". Word endings are also handled: title ~ "Runbooks" finds runbook titles (checked on Confluence Cloud, November 2026).