CQL title search with special characters

Hi,
I’m using CQL to search for Confluence content through the api/search REST point.
To search for content I’m using the following query:

(title ~ "{QUERY}*")

Where {QUERY} is my current search term. This works well, however I’ve found that if I’m searching for content with special characters in the title I’m not getting this to work.
For example, If I try to find my page with the title “cross-platform shenanigans” I cannot find it if the query contains the dash “-”.

(title ~ "cross-pl*")
(title ~ "cross\-pl*")

I realise that it probably hooks in as an exclude operator but I haven’t been able to escape the character.

Anyone seen similar issues?

1 Like

I have been in contact with Atlassian through Developer Service Desk and they have confirmed that this is a limitation in Confluence’s search functionality.

As it is not considered a bug, you can vote for the “feature” here: [CONFSERVER-55559] Special characters and word AND in CQL queries - Create and track feature requests for Atlassian products.

This is EXTREMELY annoying and a showstopper for automations we’re trying to implement - unless we revise dozens of labels on hundreds of pages to use underscores, and then all the macros that use those labels… (I’ve added my 2 bits to [CONFSERVER-55559] Special characters and word AND in CQL queries - Create and track feature requests for Atlassian products.)

It’s particularly surprising that Atlassian QA let this one out of the bag and don’t consider it a serious bug since many of their ‘out of the box’ labels on templates use dashes!

2 Likes