How do I exclude placeholders and HTML macro content from showing up in search results in my space?

Philipp September 16, 2021

Hello. We are building a wiki within Confluence Server for our department. This requires users to easily find content through search (either through the search box in the top bar or through the page tree search macro).

I created templates for articles with placeholder text that gives some additional instructions how to optimally structure the content of pages. According to this Atlassian page, "placeholder text will only appear when a page is being edited – it’s invisible to anyone who’s viewing the published version".

However, I noticed that the placeholder text does in fact appear in the search results, which contradicts the very definition of it and clutters search results with unnecessary and confusing information for readers.

On closer examination, I also noticed that the code inside of HTML macros, which we employ in a few articles, also appears in the search results, which is even less desirable.

Example: We have an auto-direct page from "Komplexitätsvermeidung" to "Komplexitätsmanagement". The contents of its HTML macro are shown in the search result on top. In the second result, a placeholder text ("LEER LASSEN") can be seen, which we use to mark sections that shall remain free for better vertical spacing.

confluence search placeholders html.png

In my opinion, this Confluence behavior is a bug and should generally be fixed. I would file a bug report, but I can't do that as a Confluence Server user.

Until then, is there any way to prevent placeholder text and HTML macro content to appear in search results in a space? (Apart from removing all of it, obviously, which isn't an option.)

Thank you.

5 answers

0 votes
rvallieu April 27, 2023

I find it very unfortunate that there isn't a built-in filter to exclude text found in HTML macros in the search results.

0 votes
Philipp October 11, 2021

Atlassian informed us that this issue has in fact been known for years, but they decided to not resolve it. This is a really unfortunate decision in my opinion. See CONFSERVER-33208, which links to multiple similar issues. (They use the term "instructional text" for placeholders - that's why I originally didn't discover these issues.) 

0 votes
Philipp September 21, 2021

Thanks for your answers. We did now create a support request to Atlassian, who will hopefully turn this into a proper bug ticket.

0 votes
Christian Bühlmann September 20, 2021

Dear Philipp

Same issue here. We generate Confluence pages using a template engine (outside Confluence).


The templated content is irrelevant for users and does obstruct finding the actual content.
Would love to see a feature to tell Confluence not to index certain elements of a page.

Did you already create an issue / feature request?

Cheers,
bue

0 votes
Dominic Lagger
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.
September 16, 2021

Hi @Philipp 

I just tested your case with placeholders (instructional text). And yes, I could reproduce this and yes, I think this is a bit strange. 

But, I do not think, that there is any solution for this. I'm not aware, that you can exclude these things. 

When you can not create an incident to atlassian support, try to ask your confluence admin to do that.

Regards, Dominic

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events