How do you search for an exact phrase in JIRA?

Greg Froese November 20, 2018

I want to be able to search for something like "first point" where that exact phrase appears in the ticket.  The word "first" followed by "point".

 

The article here shows how to do that but it doesn't work when I try it.  The results contain word stemming and anything that has both the words in it.

 

3 answers

2 votes
Mykenna Cepek
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
August 9, 2021

See also these requests/bugs related to exact searches:

Please consider adding your votes to the above; thx.

2 votes
Tom Lister
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
November 20, 2018

Hi @Greg Froese

this article is more specific about text searching - Apache Lucene index searches

https://confluence.atlassian.com/jiracoreserver073/search-syntax-for-text-fields-861257223.html

Although it suggests “first point” in double quotes should work. 

You could try a proximity search 

“first point”-1

Greg Froese November 23, 2018

Thanks for the link, I hadn't considered the proximity search, however, when I tried it, I kept getting results that simply had both words somewhere in the ticket.

In fact, the results contained tickets that had one word in the summary and the other word in the description.  Apparently the proximity was not being respected even across fields.

Further to that, I was seeing results for the singular version of the word I was searching for. 

When searching for "points" I am seeing results with only the word "point"

Tom Lister
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
November 23, 2018

Hi 

that proximity syntax should have been

"first^0 point"

i.e. 0 words between terms

Greg Froese November 23, 2018

"first^0 point"

returns the exact same results as:

'"first point"~1'

And they aren't what I expect ;)

Tom Lister
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
November 23, 2018

:-(

my bad

one last time with feeling as band leaders say

text ~ "\"first point\"~0"

escaping quotes with clause

Greg Froese November 23, 2018

Still no dice, and I tried with feeling.

The ^ operator is what boosts that terms significance, at least according to the documentation and it isn't getting me the exact string results.

I toyed with the idea of adding an exclusion to my query but that won't work as one of the things I'm searching for is "form" and I'm getting results for "for" which I can't exactly exclude.

Looks like this is something that just cannot be done, which is bizarre as that is a pretty basic request in the searching world

Tom Lister
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
November 23, 2018

Ok

I did test the text ~ "\"first point\"~0" syntax on my server and it gave the results I expected

although my test was

 text ~ "\"like a\"~0"

matches "I'd like a historical story"

doesn't match "I'd like gap a historical story"

Greg Froese November 23, 2018

As you can see, I replicated your example, or very close to it.

Just put the word gap between "historical" and "story" as those are more unique words, and the search still returns both tickets.

 

2018-11-23_10-28-41.png

Tom Lister
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
November 23, 2018

?? Same test works on my server so they must be different versions/platforms

Mine is 7.12.1 server install. Are you on cloud?

Screenshot 2018-11-23 at 16.47.14.pngScreenshot 2018-11-23 at 16.46.55.png

COOL-22 drops out in second search

Like Semir Dobraca likes this
Greg Froese November 23, 2018

Yep, on Cloud.

Must be different indexing options which I wouldn't have access to on Cloud.

Thanks for all your help.

1 vote
Jack Brickey
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
November 20, 2018

I'm not sure this is possible OOTB. I recall trying this a long time back w/o success and just played with it and could not get it to work. Maybe there is a way but I can't find it. You might check an addon like Scriptrunner. It has and exactmatch function I believe but have not tried it myself.

Greg Froese November 23, 2018

Needing an addon to perform a basic search seems like overkill.

If this becomes a larger issue with more people unable to find what they are looking for, then I will check into that option a little deeper.

Thanks for the suggestion.

Like # people like this
Tom Lister
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
November 24, 2018

raised as a suggestion with Atlassian

JRASERVER-68490

if you want to follow it

Greg Froese November 26, 2018

Followed.

Thanks

Like Jeff Davidson likes this

Suggest an answer

Log in or Sign up to answer