Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

text ~ does not seem to be working when searching Summary?

I am trying to use the ~ operator with text as per https://confluence.atlassian.com/jiracorecloud/advanced-searching-fields-reference-765593716.html#Advancedsearching-fieldsreference-textTextText to search for issues which have 'xyz' or 'xyz*' in their Summary, Description and/ or Comments fields.

The search string looks as below, but the results are excluding issues where xyz appears in 
the Summary field. Any idea what I may be doing wrong?

text ~ xyz 

Version: JIRA v7.10.2
              JIRA Service Desk Application v3.13.2 (License Information for JIRA Plugins)

1 answer

Hi, 

The summary field is a separate field from which you can search.

Therefore, your JQL may look like this:

text ~ xyz OR summary ~ xyz

Hi Maksim,

Thank you for your reply, however the Atlassian Help page I referenced above explicitly states that -

Text

This is a "master-field" that allows you to search all text fields, i.e.:

  • Summary
  • Description
  • Environment
  • Comments

Given this, I am at a loss to understand why a text ~ search will not retrieve those records which have xyz or xyz* values in their Summary.

Is the Help link outdated? I did not find a date on Atlassian's Help pages so have no way of knowing if the Help documentation is current or not. I can explicitly search for the text in the Summary field, but now, I do not know if the text ~ works on the other 3 text fields above as well, necessitating a search in each of them which would be rather cumbersome. 

You're right. The query text ~ xyz should search the summary field.

Did I understand correctly that the query summary ~ xyz returns issues that text ~ xyz cannot return?

Hi Maksim,

Thank you for your prompt reply again.

I just checked, Summary ~ xyz is ALSO NOT retrieving the record where xyz123 is a word in the Summary. Now I am really not sure how to proceed.

Try do a re-index jira.

Just try one project reindex(In which is issue with xyz123 summary).

So, on further investigation, it appears the issue has to do with the usage (or not) of the wildcard * character. Changing the original search text to

text ~ "xyz*"

works. As does:

Summary ~ "xyz*"

..if anyone were to want to search for issues containing xyz123 in the Summary, Description, Environment, Comments fields OR just in Summary, respectively.

It is STILL not clear, however, why just using

text ~ xyz

 did not work. After all, what then is the use of '~' (or it's difference from '=', if an additional wildcard STILL needs to be used in the search string)?

So, on further investigation, it appears the issue has to do with the usage (or not) of the wildcard * character. Changing the original search text to

text ~ "xyz*"

works. As does:

Summary ~ "xyz*"

..if anyone were to want to search for issues containing xyz123 in the Summary, Description, Environment, Comments fields OR just in Summary, respectively.

It is STILL not clear, however, why just using

text ~ xyz

 did not work. After all, what then is the use of '~' (or it's difference from '=', if an additional wildcard STILL needs to be used in the search string)?

Payne Community Leader Feb 22, 2019

Without a wildcard, ~ looks for whole words within a field. The difference between ~ and = is that ~ matches if the word appears in the field, whereas = requires that the field match exactly. Then, further, as you've found, you can use the wildcard to match partial words.

Thank you, @Payne that helps! The distinction between ~ and = is clear now.

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Posted in Jira Core

How to manage many similar workflows?

I have multiple projects that use variations of the same base workflow. The variations depend on the requirements of the project or issue type. The variations mostly come in the form of new statuses ...

3,894 views 11 5
Join discussion

Community Events

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

Events near you