Confluence Search Fields

Still need help?

The Atlassian Community is here for you.

Ask the community

This page gives an overview of the Apache Lucene search fields used in Confluence.

Filter with CQL

Before you dive into learning more about Lucene fields, you may want to learn about the powerful search filtering offered by Confluence Query Language (CQL).

What's CQL, and how do I use it?

CQL (Confluence Query Language) is a query language developed for Confluence, which you can use in some macros and the Confluence search. Confluence search and CQL-powered macros allow you to add filters to build up a search query, adding as many filters as you need to narrow down the search results.

Use the Add a filter link to add more filters to your query.
 

Use AND, OR, and NOT operators
  • For an OR search, specify multiple values in the same field.
    So to show pages with 'label-a', 'label-b' or both you'd put 'label-a' and 'label-b' in the same Label field, like this:
  • For an AND search, add more than one filter and specify a single value in each.
    To show only pages with label-a and label-b you'd put 'label-a' in one label field, then add a second Label field to the macro, and put 'label-b' in the second one, like this:

    Put simply, OR values are entered in the same filter, AND values are entered in different filter. 
    Only some filters support AND. If the filter doesn't support the AND operator, you won't be able to add that filter more than once.  
  • For a NOT search, enter a minus sign (-) before the label. This'll exclude everything with that label.


You can use the following CQL filters to build your query:

FilterDescriptionOperators
Label*

Include pages, blog posts or attachments with these labels.

OR (multiple values in the same filter)

AND (multiple Label filters)

With ancestor

Include pages that are children of this page.

This allows you to restrict the macro to a single page tree.

OR (multiple values in the same filter)
Contributor**

Include pages or blog posts that were created or edited by these people.

OR (multiple values in the same filter)
Creator

Include items created by these people.

OR (multiple values in the same filter)
Mentioning user

Include pages and blog posts that @mention these people.

OR (multiple values in the same filter)
With parentInclude only direct children of this page (further sub-pages won't be included)EQUALS (one page only)
In space**Include items from these spaces.OR (multiple values in the same filter)
Including text**Include items that contain this text.CONTAINS (single word or phrase)
With titleInclude items that contain this text in the title.CONTAINS (single word or phrase)
Of type**Include only pages, blogs or attachments.OR (multiple values in the same filter)

* This field is required in CQL-powered macros.

** You can add these filters in CQL-powered macros but in search they're part of the standard search filters, so they don't appear in the Add a filter menu.

Searching for content in specific fields

Confluence data is stored in fields which can be specified in the search. To search a specific field, type the name of the field followed by a colon ':' and then the term you are looking for. For example:

title:"Some Title"
labelText:chalk

The field specification applies only to the term directly preceding the colon. For example, the query below will look for "Some" in the title field and will search for "Heading" in the default fields.

 

title:Some Heading

To learn more about using Confluence search fields in an advanced search query, head to Confluence Search Syntax

Confluence search fields

Below are the fields which can be searched, listed by content type.

Personal Information

Name

Indexed

Stored

Tokenized

Notes

handle

true

true

false


type

true

true

false


urlPath

true

true

false


fullName

true

true

true


title

true

true

false


labelText

true

true

true


modified

true

true

false


created

true

true

false


contentBody

true

true

true


Pages

Name

Indexed

Stored

Tokenized

Notes

handle

true

true

false


type

true

true

false


urlPath

true

true

false


title

true

true

true


spacekey

true

true

false


labelText

true

true

true


modified

true

true

false


created

true

true

false


contentBody

true

true

true


macroName

true

true

false

The name of a macro used on the page

Blog

Name

Indexed

Stored

Tokenized

Notes

handle

true

true

false


type

true

true

false


urlPath

true

true

false


title

true

true

true


spacekey

true

true

false


labelText

true

true

true


modified

true

true

false


created

true

true

false


contentBody

true

true

true


macroName

true

true

false

The name of a macro used in the blog

Attachments

Name

Indexed

Stored

Tokenized

Notes

handle

true

true

false


type

true

true

false


urlPath

true

true

false


filename

true

true

true


title

true

true

false


comment

true

true

true


spacekey

true

true

false


modified

true

true

false


created

true

true

false


contentBody

true

true

true


Mail items

Name

Indexed

Stored

Tokenized

Notes

handle

true

true

false


type

true

true

false


urlPath

true

true

false


title

true

true

true


spacekey

true

true

false


messageid

true

true

false


inreplyto

true

true

false


recipients

true

true

true


labelText

true

true

true


modified

true

true

false


createdtruetruefalse

contentBody

true

true

true


Notes

To find out the version of Lucene Confluence is using go to <installation directory>/confluence/WEB-INF/lib and locate the Lucene jar files. The Lucene version number will be part of the filename.

Last modified on Feb 29, 2024

Was this helpful?

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