This page last changed on Aug 06, 2008 by smaddox.

When you perform a search in Confluence, it is likely that there will be many pages or other content items that match your search terms. Confluence will rank the matching items by evaluating their relevance. This should mean that the items most relevant to you will appear at the top of the search results list, so that you can quickly select the item you need.

Below is an overview of the method Confluence uses to determine the relevance of the items returned by the search, i.e. to rank the search results.

On this page:

Error formatting macro: toc: java.lang.NullPointerException

Philosophy behind the Ranking

Confluence gives highest priority to personal information i.e. documents which take you to a user's profile when you click on them. Collaboration is a primary function of a wiki, so Confluence makes it easy to find people.

For example, if you search for 'John Smith', the first results you see will be for John Smith's user profile and personal space. There may also be other content (wiki pages, email messages, etc) which contain the words 'John Smith'. These other content types may even have 'John Smith' as the page title and repeated multiple times in the content, but they will still appear lower down in the list of search results.

Matching terms found in the title of a page, or in the title of any content type, are considered a strong match. So are matches found in labels, because when someone applies a label it means that they think the content is particularly relevant to the labelled term.

Matches found in the content body are of average importance. If the matched term appears more than once, the document will be given a proportionately higher ranking.

Summary of the Ranking Method

When displaying the results of a search, Confluence applies a weighting to each of the content items returned.

To determine the weighting:

  1. For each content item, Confluence first applies two weightings based on the following:
    1. The content type of the item returned — user profile, page, news item, attachment, etc. (More details below.)
    2. The type of field in which the search term was found — title, name, label, or content body. (More details below.)

  2. Confluence then combines the two weightings to arrive at a single weighting for the content item.

The item with the heaviest weighting will appear at the top of the list of search results, and the other items will appear below in descending order of weighting.

Weighting of Content Types

Content Type Weighting
User Profile 9
Page 8
Blog 7
Attachment 6
Comment 5
Mail 0.5
Space Description 0.4
Simple example

If the search returns 7 matching items, and each item is one of the above types, then the items will be presented in the above order on the results screen. (This example assumes that the search term is found in the same field in each item — see more about fields below.)

Weighting of Fields

Field Name Weighting
Title 9
Full name 8
Label text 7
Content 5

Note that 'content' above could be the content of a page, or the content of a comment, or the body of any other content type. See more about content types above.

Simple example

A match for a search term in the title of a document is 1.8 times (9/5) more important than a match in the content.

Simplified Example

Let's assume you search for a single term.

Confluence finds a match in the title of an email:

Weighting for the content type (email) 0.5
Weighting for field (title) 9
Total weighting 4.5



Confluence also finds a match in the content of a comment:

Weighting for the content type (comment) 5
Weighting for field (content) 5
Total weighting 25

Result: The comment (weighting 25) will be appear higher in the search results than the e-mail (4.5).

Confluence uses the Apache Lucene search engine library. Lucene's score calculation has a number of additional terms, not mentioned in the above example. We have simplified above, for purposes of illustration. If you are interested, you can see more information in the Lucene documentation.

RELATED TOPICS

Searching Confluence
Confluence Search Syntax
Confluence Search Fields
Text Tokenisation and Filtering
Search Macro
Livesearch Macro
Pagetree Macro (includes an optional search box)

Take me back to Confluence Documentation Home

Document generated by Confluence on Aug 07, 2008 19:09