Is it possible to exclude pages from the Confluence Search?

Is there any way to exclude pages from the confluence search? I love the {cache} macro that allows me to include content in the confluence search, but I would like to be able to exclude pages.

We have a lot of inlcuded content, and I would like to direct the users to the most suitable pages.

Or, if there is not a way to exclude content, is there a way to promote the pages we want the users go go to, to come higher in the search results?

4 answers

1 accepted

OK, here's what I have done, taking Sarah's suggestion from the comments here and the comments on Sarah's blog post.

on my source pages, I used the {show-to} macro to hide the content to anonymous users, but provide a link back to the main page that contains the linked content. The source page named _MySourcePage will still show up in searches, but there is no content visible on this page except the link to the page where the anonymous user should view the content.

I also put a panel on top of the page to tell my editors that the content on this page is only visible to them. The Panel is also only visible to the editors, and not to anonymous users.

The content that is going to be linked, is linked via the {multi-excerpt} macro (a paid plugin - see my blog post about how I'm using linked pages), so when the content within the multi excerpt is included in my LinkedPage, then it is visible to the Anonymous users. Here is my code:

See [LinkedPage] for the contents of this page.
{show-to:user=editors}
{panel:title=SourcePage}
This section or page is linked to [LinkedPage]. The Content of this page is visible in {link-to:page edit}Edit Mode Only{link-to}.
{panel}
{multi-excerpt:name=_SourcePage}
Body of Page
{multi-excerpt}
{show-to}



Of course, most of this additional content is in a macro, which makes it easy to include on the page. It seems to work well now.

Let me know if you think there is a better way to achieve this result.

Hallo Jodie

In a recent blog post, Emily added a comment asking a similar question. She had some useful input about the "secure-include" macro, supplied by the Perimeter plugin from Customware. David Peterson also added some useful advice. In combination with the cache macro, this may satisfy your requirements. See the comment chain on this blog post:

http://ffeathers.wordpress.com/2011/04/03/content-reuse-on-a-wiki-a-case-study/

Let me know if it works for you. :)

Cheers, Sarah

Hi Sarah, thanks for that. Yes, I had read that excellent post before. It does look like the only way. Unfortunately I had not created my source content in a separate space, and now it would be way to big a job to change it all, so I will have to leave it for now.

I did think of one idea however. On the pages where I'm using the Builder-Show macro to include that content on other pages, I just hide all the content on that source page, so if the search points them to that page, they won't actually see anything. It sort of works, but can be annoying to the user.

Hallo Jodie

Sounds good! The {excerpt} macro also has a parameter that you can use to hide the content on the page where the excerpt is defined.

{excerpt:hidden=true}A short summary of this page{excerpt}
As you pointed out, this can be annoying to readers, and even to community authors who want to update the page and wonder where the content is. What I've done sometimes is to write some words on the page, saying that the content is visible when you edit the page or view source. I also add a link to the principle page where the content is used. That helps both authors and the people who came in via Google looking for the actual information.
Cheers, Sarah

Jodie,

Don't fear the fact that you didn't create your content in a separate space. You probably have it organized hierarchically. Just move the parent page to the new space and the descends of the parent move with it. It is easy. Move is under the Tools menu on the upper right.

You can limit searches to spaces.

You can include labels in searches. This may be what you want, for you can go to the relevant pages and add a label like JodieRecommends and then search for that label.

See the general help on searching in the Conf. documentation.

We also have a feature request CONF-33161 raised to address that :).

Suggest an answer

Log in or Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Kesha Thillainayagam
Posted Friday in Confluence

We want to hear how your non-technical teams are using Confluence!

Hi Community! Kesha (kay-sha) from the Confluence marketing team here! Can you share stories with us on how your non-technical (think Marketing, Sales, HR, legal, etc.) teams are using Confluen...

262 views 11 10
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you