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:
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.
We also assume that information created recently is slightly more relevant than older information.
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:
- For each content item, Confluence first applies three weightings based on the following:
- Confluence then combines the three 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 |
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. |
Weighting Based on Age
This weighting is based on the age of the item returned in the search results. The age of the item is calculated from the creation date of the item. The age intervals are quite coarse-grained, as shown in the table below.
When the Item was Created | Weighting |
|---|---|
Today | 1.5 |
Yesterday | 1.3 |
Up to 1 week ago | 1.25 |
Up to 1 month ago | 1.2 |
Up to 3 months ago | 1.15 |
Up to 6 months ago | 1.10 |
Up to 1 year ago | 1.05 |
Beyond a year | 1 |
The weighting is fairly small, so will not have a large effect. When an item is more than a year old, the age weighting is just '1' i.e. it has no effect.
Simple example
|
Simplified Example
Let's assume you search for a single term.
Confluence finds a match in the title of an email message created today:
Weighting for the content type (email) | 0.5 |
Weighting for field (title) | 9 |
Weighting for age (today) | 1.5 |
Total weighting | 6.75 |
|---|
Confluence also finds a match in the content of a comment created three weeks ago:
Weighting for the content type (comment) | 5 |
Weighting for field (content) | 5 |
Weighting for age (up to 1 month ago) | 1.2 |
Total weighting | 30 |
|---|
Result: The comment (weighting 30) will be appear higher in the search results than the e-mail (6.75).
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 Results Macro
Livesearch Macro
Page Tree Macro (includes an optional search box)
Take me back to Confluence Documentation Home







11 Comments
Hide/Show CommentsAug 24, 2009
Anonymous
How does 5 + 5 + 1.2 = 30? in the example for weighting...
Aug 25, 2009
Sashidaran Jayaraman [Atlassian]
Hi,
It should be 5 x 5 x 1.2. This is equals to 30.
Hope that helps.
Cheers
JSashi
Oct 30, 2009
Anonymous
Is there any way to add weighting criteria? I am interested in allowing user feedback to contribute to the weighting for content items matching search requests. For example, if I drill into a content item and it matches my search perfectly, can can rate that content item. That content item would then be more likely to come up (weighted heavier) if the same search word(s) is added by someone else.
Oct 30, 2009
Anonymous
I thought I had seen mention of a new plugin type that could boost the search ratings, but I had trouble finding it a few minutes ago.
Oct 30, 2009
Anonymous
I may have remembered this page, FedEx XI Delivery - Awesome Search for Confluence, sadly this doesn't mean the feature is or will be implemented.
Aug 19, 2010
Anonymous
We need to be able to configure the ranking system so that results from a certain set of
spaces "float above" the regular results, in the manner of "Google sponsored links".
We have many spaces and many users and a few "authoritative" spaces that do not
necessarily need to be updated frequently. The way Confluence ranks results means that
user pages (which may or may not be accurate but are updated frequently) will often push
the correct & authoritative results to the second or even third page of results. We are using
v2.9.1 and it's discouraging that weighting our own search results doesn't seem to be an option.
Aug 24, 2010
Sashidaran Jayaraman [Atlassian]
Hi,
I am afraid that this is not currently possible. However, I have found a similar feature request. Please add yourself as a watcher, vote for this feature and add your own comments to this feature request. For further details on how we include new features and improvements, you might want to read this page
Cheers
JSashi
Sep 03, 2010
John Connors
"Weighting of Fields" refers to "Title" and "Full Name". What is the difference between these two fields? Does Full Name refer to content tagged using h1?
Feb 25, 2011
Jonas Lindström
I believe Full Name refers to user profiles and Title refers to pages.
Oct 12, 2010
Charles Hall
Could the table of "Weighting of Content Types" be updated with the status update element type please?
Oct 22, 2010
Lis Riba
Something else worth noting.
Within page content, formatting does not affect ranking.
Whether a word or phrase is bolded or within a heading tag doesn't matter. (However, make sure to put a space after the h4. because a search for word won't match h4.word .)
Just some info found thru some sandbox testing.
Add Comment