how to search exact phrase in comments

Deleted user October 10, 2019

how do i search for NGS_ERR_SYS_VOLS_NOT_ADDED in the comments

 

ive tried comment ~ "\"NGS_ERR_SYS_VOLS_NOT_ADDED\"" with no luck

1 answer

0 votes
John Funk
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
October 10, 2019

Hi Scott - try this:

comment ~ "NGS_ERR_SYS_VOLS_NOT_ADDED"

Deleted user October 10, 2019

tried that and it did not return anything

John Funk
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
October 10, 2019

It might be the underbars that are causing the problem. Try just comment ~ "NGS" and see if it comes up.

Deleted user October 10, 2019

yes that pulled up a few items. Now i need to get it to something more specific. @John Funk is there a way to account for the underscores?

Andrew Laden
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.
October 11, 2019

try escaping the underscores like you escape the " by putting a \ in front of them.

comment ~ "\"NGS\_ERR\_SYS\_VOLS\_NOT\_ADDED\"" 

Deleted user October 11, 2019

i gave it a go, but i got this error 

Error in the JQL Query: '\_' is an illegal JQL escape sequence. The valid escape sequences are \', \", \t, \n, \r, \\, '\ ' and \uXXXX. (line 1, character 42)

Andrew Laden
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.
October 11, 2019

Dug into this a little. Jira uses Lucene Search under the covers.

https://jira.atlassian.com/browse/CONFSERVER-3036

Lucene search treats the underscore as a word divider in its standard tokenizer modules, which i believe is based on Unicode word boundary definitions

   http://www.unicode.org/reports/tr29/#Word_Boundaries

So it will always treat it as a space.

That said, the behavior should be predictable. So what if in your original query you replace the underscore with spaces?

What is the actual issue? Are you getting no results, or are you getting too many?

Deleted user October 11, 2019

yeah exactly. Ill enter the query and it won't return any results. 

Andrew Laden
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.
October 11, 2019

Hmm, I can't replicate. I added a comment with that string, and searched and it came right up.

What is the actual comment in the ticket that you are trying to find. Is the text part of a bigger string? 

Deleted user October 11, 2019

the entire phrase im trying to search is NGS_ERR_SYS_VOLS_NOT_ADDED

Andrew Laden
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.
October 11, 2019

Is that the entire comment in the ticket you are looking for? or does the full comment contain more text. What is the actual comment in which that string appears?

Deleted user October 11, 2019

oh. Thats part of a longer comment

"Jordan pointed out that we have 3 additional OPERATIONAL errors that can cause fails that
have not been converted to the new ngs_state style.

These can occur on the svolsAdd, userInfoAdd, and databankInfoUpdated commands

Stan -Can you add these in as well?

#define NGS_ERR_SYS_VOLS_NOT_ADDED (0x000f0000)
#define NGS_ERR_USER_INFO_NOT_ADDED (0x00100000)
#define NGS_ERR_DATABANK_INFO_NOT_UPDATED (0x00110000)

They are all extra details for "NGS_OP_OPERATIONAL" "NGS_STATE_FAILED" cases as they should always work,
if they don't its a failure."

Andrew Laden
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.
October 11, 2019

Well, I'm out of ideas. I put that exact comment into a ticket on my test instance, and it came right up in a search.

Try re-indexing maybe. 

Sorry I can't be of more help.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events