Searching for single words in text fields does not work in Jira
プラットフォームについて: Cloud、Server、および Data Center - この記事はすべてのプラットフォームに等しく適用されます。
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.
*Fisheye および Crucible は除く
要約
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.
環境
All versions of Jira Core 8.
It's actually a consequence of making use of Apache Lucene 7.
診断
When performing searches on text fields with only a single word, Jira doesn't bring the expected results:
summary ~ A
summary ~ "on"
"Custom text field" ~ A
原因
Jira 8 upgraded Apache Lucene from 3.3 to 7.3, and Lucene 7 has the following index stop words:
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.
A more detailed explanation's available on Kamil's comment on:
JRASERVER-72380 - 課題詳細を取得中... ステータス
ソリューション
- 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.