projectdoc Toolbox

Show how to use document properties to filter on searches.

Audience
Type
Level of Experience
Expected Duration
5 min
Contents

The projectdoc Toolbox for Confluence adds every property to the Lucene search index. This way not only projectdoc macros, like the Display Table Macro or the Transclude Documents Macro, can filter on documents. Users may also apply constraints on searches they type into the search box.

This tip shows how this feature can be used by readers of documentation to remove unwanted pages from the search result set.

The Problem

If you search for a term like "Role" or "Stakeholder" you'll get plenty of hits. This is because the Core Doctypes provide doctypes with this name. For each space there may be a home page and an index page for each of these doctypes and these pages also contain the string "Role" or "Stakeholder".

In addition to those, there are also home pages and index pages for the corresponding type doctype, like "Role Type" and "Stakeholder Type". So these pages will also clutter your search result.

The result set above shows a number of home pages for Role Types.

Two Kind of Pages

There a two kind of pages in a Confluence site: destination pages and navigation pages.

Destination Pages

A destination page is a page contains actual relevant information. It is something like a description, an open issue, a service, a role, or a stakeholder.

Destination pages why a space has been created.

Navigation Pages

A navigation page has only one purpose. It holds links of some kind and enables users to browse pages. Navigation pages are important to organize and find pages, but no space would be created only for navigation pages.

Home page and index pages typically have only navigation purposes. Readers know where to look for a list of roles or the address book of stakeholders.

When searching for "Role" or "Stakeholder" these navigation pages should not show up as search results.

Filter Navigation Pages

Confluence does not distinguish between destination pages and navigation pages. There is only the concept of a page.

The projectdoc Toolbox provides navigation pages by the doctype named docsection.

This makes it easy to remove these pages from the search results!

Instead of 

"Role"

you would type the following:

"Role" -Doctype: docsection

Now Confluence will only return destination pages related to "Role" and remove all navigation pages from the result set.

 

The Doctype property is almost like any other property. The same way you filter on the Doctype property you could chose any other property or combination of properties to put constraints on a search.

"Role" +Severity: High +Doctype: task

Summary

A Confluence site consists of a number of spaces. Within a space home pages and index pages provide navigation support to users. They make it easy to browse documents of a given type and find related information.

Besides navigation page as space's main purpose is to server destination pages. In searches user typically want only destination pages in their result set.

To remove navigation pages add -Doctype: docsection to your search query.


Resources

More information on running and configuring searches in Confluence.

Search
Confluence gives you a few ways to find what you're looking for. Here's an overview of Confluence search, and a few tips to help you find things more easily.
Configuring the Confluence Search and Index
Confluence administrators can adjust the behavior of the Confluence search, and manage the index used by the search.
Confluence Search Syntax

You can create an advanced search query using Confluence search syntax. These are special words and symbols you enter into the search field to narrow the focus of your search. This page outlines the syntax supported by Confluence's search engine, Lucene.

Search Tips
Tips on specifying search queries for Lucene. This also applies to projectdoc's query macros.