I was searching some issues in JIRA by applying a filter and I provided three words in the Query field lets say that ( JIRA is good).
When I hit search, I am getting result based on all the words like the Summary conatining only JIRA is also coming in search result and Summary containing only good is also coming in search result, but what I want is the search result which contains only those with Summary containing all of the above three words in combination.
According to me, Summary should contain only search result with above three words at any place any order
What query should I apply to achieve this result.
Thanks to everyone who is investing time in this. The above suggestion doesn't work for me, but even if it did, why is it expected that the user would need to research the proper syntax for escaping the quotes and using a tilde to perform a simple text search? Advanced syntax should be for instances where you need to search for things like a special character inside of a comment. 99.9% of the time people just need to search plain language phrases so they can locate the ticket or comment that contains the details they're looking for.
I can't believe that it's possible for Atlassian to have raised $462 million in their IPO 4 years ago and yet Jira still doesn't have a working (nevermind simple/common sense) exact phrase search. Am I just missing something...? Was there $10k in the budget to get this working? I'm sure more than $10k worth of clients would appreciate it.
I just retested Cloud on the off chance that something has changed. This solution is still equivalent to
which returns all issues with both the word Jira in them and the word good in them, rather than only issues with the exact text "Jira is good" in them.
This isn't what the OP (& the rest of us) is asking for at all.
Roger that, I included the ~0 bit.
I'm guessing that some admins have disabled word stemming leading to different end user experiences (see the bottom of https://confluence.atlassian.com/jiracorecloud/search-syntax-for-text-fields-765593720.html for Cloud or https://confluence.atlassian.com/jiracoreserver/search-syntax-for-text-fields-939937723.html for Server)
I just tested this on my Cloud instance by setting indexing to other. It's better but it's still not an exact match. For example:
still matches the phrase
even though it's not an exact match.
I'm guessing that server will have the same "extra" matches as well. Perhaps someone can test this?
The bad part about this partial solution is that it affects all users and all searches, rather than letting the individuals searches declare if they need stemmed matching or exact matching.
diving in a little further.
it seems that "proximity searches" are not working as documented,
at least in jira cloud.
specifically, i created a test ticket who's description is:
test jira search.
jira versus exact phrasing.
and then do an advanced search with:
text ~ "\"jira phrasing\"~0"
which yields the test ticket, when it shouldn't.
same results with ~1, which also shouldn't match "jira versus exact phrasing".
text ~ "\"jira phrasing\"~1"
The funny part is that it does not even take a multiple word scenario to cause it..
Searching for "summary ~ "FT#3"
matches a description "FT#4 for server number 3"
Even if you use all of the clever quote escaping above it still matches. So I cannot even query for a simple one word phrase
Does that actually work for you? I have tried it out since version 4.4 (when I started to use JIRA)and it generates results more like field contains word1 or field contains word2 or field contains word3 which is the behavior that Mohit was complaining about.
The reason for questiong, is because maybe there is an option that people can turn on.
Normally I don't post "ME TOO!" but this question has been open since 2012 and the answers only echo the Jira documentation description ~ "\"match this exact phrase\""
This does not work for me and obviously not for some other users.
Does something have to be explicitly configured to make this work?
I, too, find it very frustrating that there is not a better way to do an exact search on text fields in JQL. I have a use-case for this where I need to make sure my JQL query returns only 1 issue as I know there is only one where the summary exactly matches my search term, with no extra terms outside of that. I tried things that others suggested here, like:
summary ~ "\"Sample text\" NOT \"Sample\ text\ *\""
summary ~ "+\"Sample\ text\" -\"\ *\"~0"
but nothing works. It either returns nothing, or it returns my desired issue and other issues with summaries like "Sample text abc".
After banging my head against the virtual wall for a while this morning I remembered that Scriptrunner has an issueFieldExactMatch() function built-in. I just tried it out and it worked beautifully, no special syntax or escaped characters required. You can use
issueFunction in issueFieldExactMatch('<some JQL subquery>', 'summary', 'Sample text')
Specific documentation on usage here. I agree that Atlassian should provide a better way to do exact search on text fields and that it is ridiculous that they have not yet done so. However, Scriptrunner is quickly becoming my favorite add-on and it is one of the more affordable plugins out there, arguably one of the best value for the money for how powerful I've found it to be.
If your workflow depends on an exact text field match, I suggest looking into that.
If you have Scriptrunner for Jira Cloud, it looks like this is still possible but you may have to enable "enhanced searching" to use issueFunction: https://scriptrunner-docs.connect.adaptavist.com/jiracloud/enhanced-search.html#_issuefieldexactmatch
Connect with like-minded Atlassian users at free events near you!Find an event
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.Host an event
You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events