Exclude the term when belongs to a URL

hectorcano November 12, 2019

Hi!

I need to save a search whose text is "blue" but I need to exclude the documents that contain it only within a URL. I tried excluding ".blue/" as an attempt to include the dot and the slash in the term but it doesn't seem to work.

Also, If I search both "blue" and ".blue/" separately I get the exact same list of results.

Is there any way to work around it? I'd love to have an exact search but we have stem on and turning it of for just this is not an option.

I'm trying to find out a search that includes the name of the product but excludes it if the term belongs to a URL since is also the name of the domain.

 

Thanks so much!

2 answers

1 accepted

0 votes
Answer accepted
Ignacio Pulgar
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, 2019

Reviewing the Search syntax for text fields, it is said: "The index only keeps text and numbers".

That's why "blue" and ".blue/" return the very same issues. Unless there are other words that you can use for narrowing the search (ie: www, http, https...) for building a proximity search, it is unlikely you may get what you need directly, with no help of third party apps.

Sample proximity search which return issues containing the words www and blue which have no more than one word between both of them:

text ~ "\"www blue\"~1"

ScriptRunner counts with a few functions for regular expressions although they require to explicitly pass a field name as a parameter, so won't be as easy as using text native Jira function.

Other addons might have a more convenient syntax for specifying a comma separated list of fields with no need for repeating the very same regular expression. Check JQL Search Toolkit or Power JQL.

JQL Booster Pack is also planning to include a regex support soon.

Hope it helps.

hectorcano December 12, 2019

Hi! thanks so much! This one added up as a solution!

Like Ignacio Pulgar likes this
0 votes
Ignacio Pulgar
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 23, 2019

Hi Hector,

May you try if the following query makes any difference?

text ~ blue AND NOT text ~ "\".blue/\""
hectorcano November 25, 2019

Thanks, @Ignacio Pulgar for stepping in!

This one has always returned zero results, as if the special characters were ignored. Is like searching "blue" AND NOT "blue"

Is this my only hope?

 

thanks!

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events