Confluence Search Syntax

Still need help?

The Atlassian Community is here for you.

Ask the community

You can create an advanced search query using Confluence search syntax. These are special words and symbols you enter into the search field to narrow the focus of your search.

This page outlines the syntax supported by Confluence's search engine, Lucene.

How to use search syntax

To create a search query using Confluence syntax:

  1. Click the search field at the top right of Confluence to open the expanded search panel.
  2. 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.

"product roadmap"

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.

If you'd like to change this, vote on this improvement request:  CONF-14910 - Getting issue details... STATUS

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'.

tip/resting Created with Sketch.

Avoid using special characters, such as hyphens, in page or attachment names as they may not be found by Confluence search.


Search using wildcards

Wildcards replace one or more characters in your search. They can help expand your search. For example, the search below would find https://www.atlassian.com or http://www.atlassian.jp

http*.atlassian.*

Confluence doesn't support leading wildcards. This means searching for *heese will not return cheese. 

WildcardDescriptionExample

Multiple characters

Use an asterisk (*) at the end of your word to replace multiple characters.

print* finds content containing 'printer', 'printing', 'prints' and so on.

Multiple wildcards

Use asterisks (*) to add more than one multiple-character wildcard

r*c* finds content containing 'react', 'recovery', 'refactor' and so on.

Single character

Use a question mark (?) to replace a single character in your search.

b?tter finds content containing 'butter', 'bitter', 'better', 'batter' and so on.

tip/resting Created with Sketch.

Leading wildcards

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* or ?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
OperatorDescriptionExample
NOT

Use NOT (in capital letters) to exclude a word from your search.

chalk NOT cheese finds content containing 'chalk' but NOT 'cheese'

Minus (-)

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

OperatorDescriptionExample
OR

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'

AND

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':

"octagon post"~1

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.

"octagon post"~0

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:

octogan~

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:

macroName:excerpt-include*


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:

title:some title

Use double quotes if you want to find multiple keywords:

title:"some title"

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.

FieldDescriptionExamples
macroName

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.

macroName:excerpt-include*

macroName:jira*

spacekey

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.

spacekey:MARKETING

spacekey:(IT, MARKETING)

title

Searches for content with specific words in the title.

title:"product roadmap"

type

Searches for content of a particular type. You can use the following content types in your query:

type:attachment

type:blogpost


labelText

Searches for content containing a specific label. If the label has a hyphen, include it within double quotes.

labelText:roadmap

labelText:"product-roadmap"

For more information about search fields, see Confluence Search Fields.

Last modified on Aug 17, 2021

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.