Confluence Search Syntax
How to use search syntax
To create a search query using Confluence syntax:
- Click the search field at the top right of Confluence to open the expanded search panel.
- Type your query using syntax supported by Confluence.
You can use multiple search words and operators in your query.
Screenshot: an example of a search query using Confluence search syntax
Search for an exact match
Use double quotes around your search term to find a specific word or phrase. For example "product roadmap" will search for content that contains the phrase 'product roadmap', or a phrase where 'product' and 'roadmap' are the major words.
Limitations with exact match search
Phrases with stop words
Confluence ignores common words (stop words) — such as 'and', 'the', 'or', and 'it' — even if they are included within double quotes.
For example, searching for "the IT budget" will only return pages containing 'budget', because 'the' and 'it' are stop words.
Phrases with special characters
Confluence ignores all symbols, such as hyphens or underscores, even if they are included within double quotes.
For example, if you search for "DOC-8510", you get all pages containing 'doc' and '8510'.
Avoid using special characters, such as hyphens, in page or attachment names as they may not be found by Confluence search.
Search using wildcards
Confluence doesn't support leading wildcards. This means searching for
*heese will not return cheese.
Use an asterisk (*) at the end of your word to replace multiple characters.
print* finds content containing 'printer', 'printing', 'prints' and so on.
Use asterisks (*) to add more than one multiple-character wildcard
r*c* finds content containing 'react', 'recovery', 'refactor' and so on.
Use a question mark (?) to replace a single character in your search.
b?tter finds content containing 'butter', 'bitter', 'better', 'batter' and so on.
Lucene doesn't allow wildcards at the beginning of your search, but you can format your search as a regular expression as a workaround. For example, you can't search for
?hum*, as they begin with a wildcard, but you can search for /.*hum.*/ and find things like hum, human, and inhumane.
Exclude words from your search
Use NOT or minus (-) to exclude words from your search.
chalk NOT cheese
Use NOT (in capital letters) to exclude a word from your search.
chalk NOT cheese finds content containing 'chalk' but NOT 'cheese'
Put a minus sign (-) in front of words you want to leave out.
chalk butter -cheese finds content containing 'chalk' and 'butter' but not 'cheese'
Combine search terms
Use OR (in capital letters) to search for content that contains one of the terms.
chalk OR cheese finds content containing either 'chalk' or 'cheese'
Use AND (in capital letters) to search for content that contains more than one search term.
chalk AND cheese finds content containing both 'chalk' and 'cheese'
You can also combine search terms and operators, for example:
(cheese OR butter) AND chalk
Search for nearby words (proximity search)
Use a tilde (~) followed by a number to find two words within a certain number of words of each other.
For example, the following search will return 'Octagon blog post', but not 'Octagon team blog post':
The following search won't work, because you can't search for two words within zero words of each other. If you think the words are next to each other, use the matched phrase search.
Search within an alphabetical range
Use 'TO' (in capital letters) to search for names that fall alphabetically within a specified range. For example:
[adam TO ben]
Note: You can't use the AND keyword inside this statement.
Search for words spelled similarly (fuzzy search)
Use a tilde (~) to find words spelled similarly, or to pick up misspellings.
For example, if you want to search for octagon, but you're not sure how it's been spelled, type the word followed by a tilde:
Combining search operators
You can also combine various search terms together:
o?tag* AND past~ AND ("blog" AND "post")
Searching for macros
You can search Confluence pages to find where a macro is used. Start your search with
macroName: and type the macro name after the colon. For example, to search for all excerpt-include macros:
Search specific fields in Confluence
Confluence data is stored in fields, for example title, label, type and so on. To search for content using a specific field, type the name of that field into the search box followed by a colon (:), and then the term you're looking for.
You can use multiple fields in the same query. For example, you could use the following query to find all blog posts containing the Excerpt Include macro.
type:blogpost AND macroName:excerpt-include*
Confluence will only look for the term directly after the colon. For example, the query below will search for 'some' in the title field and 'title' in the default fields:
Use double quotes if you want to find multiple keywords:
Confluence search fields
This table lists some common search fields, and shows examples of what to type into the search box. Fields are case sensitive, so make sure you type the field name exactly as it appears in the table below.
Searches for pages that contains a specific macro. Type the name of the macro in lowercase. You can use a wildcard to make sure Confluence finds the macro you're after.
Searches for content within a specific space, using the space key. Type the name of the space key in capital letters.
You can add multiple spaces using brackets and commas.
Searches for content with specific words in the title.
Searches for content of a particular type. You can use the following content types in your query:
Searches for content containing a specific label. If the label has a hyphen, include it within double quotes.
For more information about search fields, see Confluence Search Fields.