Searching for single words in text fields does not work in Jira
Platform Notice: Cloud and Data Center - This article applies equally to both cloud and data center platforms.
Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.
*Except Fisheye and Crucible
Summary
Searching for issues by matching single words or letters in text fields doesn't work in Jira. Like searching for the letter A, or word AND in the summary or any custom text field.
Environment
All versions of Jira Core 8.
It's actually a consequence of making use of Apache Lucene 7.
Diagnosis
When performing searches on text fields with only a single word, Jira doesn't bring the expected results:
1
2
3
summary ~ A
summary ~ "on"
"Custom text field" ~ A
Cause
Jira 8 upgraded Apache Lucene from 3.3 to 7.3, and Lucene 7 has the following index stop words:
1
List<String> stopWords = Arrays.asList("a", "an", "and", "are", "as", "at", "be", "but", "by", "for", "if", "in", "into", "is", "it", "no", "not", "of", "on", "or", "such", "that", "the", "their", "then", "there", "these", "they", "this", "to", "was", "will", "with");
Stop words implementation aim to prevent abuse and overload of index operations, so searching for any of the words above alone won't bring any results.
You can find a thorough technical explanation in this comment, from the related feature request:
Solution
Avoid using such single words in text fields values
Consider using Single Select fields instead of open text field instead
Overwrite Lucene's stop words list by following through How to remove stop words in JIRA's Lucene indexing. Mind this approach might result in undesirable side effects on index performance and stability — and is only available for Jira DC, not Cloud.
Was this helpful?