Documentation for JIRA 5.0. Documentation for other versions of JIRA is available too.

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3
Section
Column

This page provides information on how to perform text searches. It applies to both simple searches and advanced searches (when used with the CONTAINS operator).

This page also applies to quick search when performing a text search on the fields that this feature supports.

Tip
titleAcknowledgements:

JIRA uses Lucene for text indexing. Lucene provides a rich query language; thanks to Jakarta and the Lucene team for such a great component. Most of the information on this page is derived from the Lucene document on Query Parser Syntax.

Query terms

A query is broken up into terms and operators. There are two types of terms: Single Terms and Phrases.

A Single Term is a single word such as "test" or "hello".

A Phrase is a group of words surrounded by double quotes such as "hello dolly".

Multiple terms can be combined together with Boolean operators to form a more complex query (see below).

Note: All query terms in JIRA are case insensitive.

Column
width300px
Panel

On this page:

Excerpt
Table of Contents
minlevel2

Term modifiers

JIRA supports modifying query terms to provide a wide range of searching options.

Anchor
wildcards
wildcards

Wildcard searches: ? and *

JIRA supports single and multiple character wildcard searches.

To perform a single character wildcard search use the "?" symbol.

To perform a multiple character wildcard search use the "*" symbol.

Info

Wildcard characters need to be enclosed in quote-marks, as they are reserved characters in advanced search. Use quotations, e.g. summary ~ "cha?k and che*"

The single character wildcard search looks for terms that match that with the single character replaced. For example, to search for "text" or "test" you can use the search:

Code Block
te?t

Multiple character wildcard searches looks for 0 or more characters. For example, to search for Windows, Win95 or WindowsNT you can use the search:

Code Block
win*

You can also use the wildcard searches in the middle of a term. For example, to search for Win95 or Windows95 you can use the search

Code Block
wi*95
Info

You cannot use a * or ? symbol as the first character of a search.

Anchor
fuzzy
fuzzy

Fuzzy searches: ~

JIRA supports fuzzy searches. To do a fuzzy search use the tilde, "~", symbol at the end of a single word term. For example to search for a term similar in spelling to "roam" use the fuzzy search:

Code Block
roam~

This search will find terms like foam and roams.

Note: Terms found by the fuzzy search will automatically get a boost factor of 0.2

Proximity searches

JIRA supports finding words are a within a specific distance away. To do a proximity search use the tilde, "~", symbol at the end of a Phrase. For example to search for a "atlassian" and "jira" within 10 words of each other in a document use the search:

Code Block
"atlassian jira"~10

Boosting a term: ^

JIRA provides the relevance level of matching documents based on the terms found. To boost a term use the caret, "^", symbol with a boost factor (a number) at the end of the term you are searching. The higher the boost factor, the more relevant the term will be.

Boosting allows you to control the relevance of a document by boosting its term. For example, if you are searching for

Code Block
atlassian jira

and you want the term "atlassian" to be more relevant boost it using the ^ symbol along with the boost factor next to the term. You would type:

Code Block
atlassian^4 jira

This will make documents with the term atlassian appear more relevant. You can also boost Phrase Terms as in the example:

Code Block
"atlassian jira"^4 querying

By default, the boost factor is 1. Although, the boost factor must be positive, it can be less than 1 (i.e. .2).

 

Boolean operators

Boolean operators allow terms to be combined through logic operators. JIRA supports AND, "+", OR, NOT and "-" as Boolean operators.

Info

Boolean operators must be ALL CAPS.

OR

The OR operator is the default conjunction operator. This means that if there is no Boolean operator between two terms, the OR operator is used. The OR operator links two terms and finds a matching document if either of the terms exist in a document. This is equivalent to a union using sets. The symbol || can be used in place of the word OR.

To search for documents that contain either "atlassian jira" or just "confluence" use the query:

Code Block
"atlassian jira" || confluence

or

Code Block
"atlassian jira" OR confluence

AND

The AND operator matches documents where both terms exist anywhere in the text of a single document. This is equivalent to an intersection using sets. The symbol && can be used in place of the word AND.

To search for documents that contain "atlassian jira" and "issue tracking" use the query:

Code Block
"atlassian jira" AND "issue tracking"

Required term: +

The "+" or required operator requires that the term after the "+" symbol exist somewhere in a the field of a single document.

To search for documents that must contain "jira" and may contain "atlassian" use the query:

Code Block
+jira atlassian

NOT

The NOT operator excludes documents that contain the term after NOT. This is equivalent to a difference using sets. The symbol ! can be used in place of the word NOT.

To search for documents that contain "atlassian jira" but not "japan" use the query:

Code Block
"atlassian jira" NOT "japan"

Note: The NOT operator cannot be used with just one term. For example, the following search will return no results:

Code Block
NOT "atlassian jira"
Info

Usage of the NOT operator over multiple fields may return results that include the specified excluded term. This is due to the fact that the search query is executed over each field in turn and the result set for each field is combined to form the final result set. Hence, an issue that matches the search query based on one field, but fails based on another field, will be included in the search result set.

Excluded term: -

The "-" or prohibit operator excludes documents that contain the term after the "-" symbol.

To search for documents that contain "atlassian jira" but not "japan" use the query:

Code Block
"atlassian jira" -japan

Grouping

JIRA supports using parentheses to group clauses to form sub queries. This can be very useful if you want to control the boolean logic for a query.

To search for bugs and either atlassian or jira, use the query:

Code Block
bugs AND (atlassian OR jira)

This eliminates any confusion and makes sure you that bugs must exist and either term atlassian or jira may exist.

Info

Do not use the grouping character '(' at the start of a search query, as this will result in an error. For example, "(atlassian OR jira) AND bugs" will not work.

Anchor
escaping
escaping

Escaping special characters: \ or \\

(warning) Please be aware that due to a bug in JIRA (JRA-25092), it is currently not possible to search issues for any of the special characters mentioned below, even if they have been properly escaped in your query.

JIRA supports the ability to search issues for special characters by these characters by escaping these special characters in your query syntax. The current list of special characters is:

Code Block
+ - && || ! ( ) { } [ ] ^ ~ * ? \ :

To escape these characters, type a backslash character '\' before the special character (or if using Advanced Searching, type two backslashes '\\' before the special character).

For example, to search for (1+1) in either a simple or quick search, use the query:

Code Block
 \(1\+1\) 

and to search for [example] in the summary of an advanced search (in JIRA Query Language or JQL), use the query:

Code Block
summary ~ "\\[example\\]"

Please note: If you are using Advanced Searching — please see Reserved Characters for more information about how these characters and others are escaped in JIRA Query Language.

Anchor
reserved
reserved

Reserved words

To keep the search index size and search performance optimal in JIRA, the following reserved words (in English) are ignored from the search index and hence, JIRA's text search features:

"a", "and", "are", "as", "at", "be", "but", "by", "for", "if", "in", "into", "is", "it", "no", "not", "of", "on", "or", "s", "such", "t", "that", "the", "their", "then", "there", "these", "they", "this", "to", "was", "will", "with"

Be aware that this can sometimes lead to unexpected results. For example, suppose one issue contains the text phrase "VSX will crash" and another issue contains the phrase "VSX will not crash". A text search for "VSX will crash" will return both of these issues. This is because the words will and not are part of the reserved words list.

(info) Your JIRA administrator can make JIRA index these reserved words (so that JIRA will find issues based on the presence of these words) by changing the Indexing Language to Other (under Administration > System > General Configuration).

Anchor
stemming
stemming

Word stemming

Since JIRA cannot search for issues containing parts of words (see below), word 'stemming' allows you to retrieve issues from a search based on the 'root' (or 'stem') forms of words instead of requiring an exact match with specific forms of these words. The number of issues retrieved from a search based on a stemmed word is typically larger, since any other issues containing words that are stemmed back to the same root, will also be retrieved in the search results.

For example, if you search for issues using the query term 'customise' on the Summary field, JIRA stems this word to its root form 'custom' and will retrieve all issues whose Summary field also contains any word that can be stemmed back to 'custom'. Hence, the following query:

Code Block
summary ~ "customise"

will retrieve issues whose Summary field contains the following words:

  • customised
  • customising
  • customs
  • customer
  • etc.

(info) Please Note:

  • Your JIRA administrator can disable word stemming (so that JIRA will find issues based on exact matches with words) by changing the Indexing Language to Other (under Administration > System > General Configuration).
  • Word stemming applies to all JIRA fields (as well as text fields).
  • When JIRA indexes its fields, any words that are 'stemmed' are stored in JIRA's search index in root form only.

Anchor
limitations
limitations

Limitations

Please note that the following limitations apply to JIRA's search:

Whole words only

JIRA cannot search for issues containing parts of words but on whole words only. The exception to this are words which are stemmed.

This limitation can also be overcome using fuzzy searches.