Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

JQL text search in cloud

Dd
Contributor
November 26, 2023

Hi,

Seems like the text search (in cloud at least) is very rudimentary.

I have the following issue: I'm running a JQL query looking for tickets with text my_function in it.  

I add the condition: AND TEXT~"my_function"

The results I get include anything that has the word "my" and "function" in them. For example, I get a certain ticket that points out a ticket that the term "my_function" is not present. But separately both exist.

Ant advise (if possible) on searching for my_function exactly?

BTW - I see many other situation of odd behavior when searching for text 

Thanks

 

2 answers

2 accepted

2 votes
Answer accepted
Tim Kopperud
Community Champion
November 26, 2023

Hi @Dd, you might try something like this

AND text ~ "\"my_function\""

Original:

image.png

New result

image.png

Hope this helps.

TimK.

Dd
Contributor
November 28, 2023

This worked!

Where can one reed all these workarounds?

Tim Kopperud
Community Champion
November 28, 2023

Hi @Dd, thanks for accepting the answer. Glad it helped.

TimK.

Tim Kopperud
Community Champion
November 28, 2023

Hi @Dd, You might have a look at this article. It's for Data Center, but I think it's more relevant to your case than what i found from Jira cloud articles. 

The trick is to encaspulate the search string within quotes to force looking for the exact string. Using \ will start (or stop) encaspulating instead of ending the previous quote. So this "\"string\"" means in the end simply ""string"" . 

If you send a search string including special characters without quoting it will treat it specially (vary on the character). I think (not sure) underscore is simply regarded as space hence finding both words. 

TimK.

Dd
Contributor
November 28, 2023

Hi @Tim Kopperud 

I found this doc later and it indeed confuse me. Seems like some of the search mechanisms work for cloud as well. I'll probably check them one by one.

Thanks for explaining the quote thing since it is not explained clearly in this document 

0 votes
Answer accepted
Nic Brough -Adaptavist-
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 26, 2023

Hi Dd

It's not a "rudimentary" search, it's deliberately a "fuzzy" search.  A fuzzy search is more likely to find relevant words than an exact search.  Fuzzy searches ignore punctuation and special characters completely, because they are aimed at finding the core language that matters to humans.  They're looking for the presence of raw data, not the information that we gain from the grammar we write in text.

It's not "odd behaviour", it's working as intended, although I would say that most humans (including me) do not understand the rules of how a fuzzy search works, beyond "it is not searching for exact text"

 

It could, and probably should, be even more fuzzy that it is - years ago, I wrote an app that searched by soundex rather than whole words.  This is far less prone to missing words that have been misslpt...

Dd
Contributor
November 28, 2023

Thanks for the clarification.

It just explained to me the mayhem I would see when searching in the text fields

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events