The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

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

How to exclude one specific file type in CQL?

Manuel
February 7, 2020

Hi all,

I'm trying to exclude one certain file type (*.json) from the CQL search results. I already looked up here, but did'n find any working solution:

https://developer.atlassian.com/server/confluence/advanced-searching-using-cql/

https://confluence.atlassian.com/doc/confluence-search-syntax-158720.html

https://confluence.atlassian.com/conf72/confluence-search-fields-982323357.html

Has anyone an idea?

Thank you!

1 answer

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

0 votes
Answer accepted
SMS
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
February 20, 2020

Hello Manuel,

Happy to try and help you with this!

According to How to Search Specific Attachment Type in Confluence, you can use the following to narrow down a specific attachment:

/.*<attachment type>.*/ 

I then used the information from Confluence Search Syntax to negate that, by putting a minus (-) sign in front of that attachment type. It returned all files that were NOT the attachment type.

Thus, I think this would work for you:

-/.*json.*/

Can you give that a try and let me know how that goes?

Shannon

Manuel
February 20, 2020

Hello Shannon,

that's exactly what I was looking for! Works perfectly fine for me!

Thank you!

Manuel

 

PS: Just use a "NOT" instead of a "-" (minus). ;-)

SMS
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
February 20, 2020

Manuel,

Both NOT and minus (-) should work, but whichever one is easiest for you! I tested and can confirm both.

Glad to hear it helped, and have a pleasant rest of your week.

Take care,

Shannon

TAGS
AUG Leaders

Atlassian Community Events