Confluence Docs 3.0 : Ranking of Search Results This page last changed on Dec 02, 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: Philosophy behind the Ranking Summary of the Ranking Method Weighting of Content Types Weighting of Fields Weighting Based on Age Simplified Example ## 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: The content type of the item returned — user profile, page, news item, attachment, etc. (More details below.) The type of field in which the search term was found — title, name, label, or content body. (More details below.) The age of the item returned. (More details below.) 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
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.
## 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 If two documents match in all other ways then the newer one will be presented first. If the two documents being compared are both older than a year then their relative age does not matter.
## 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 Macro Livesearch Macro Pagetree Macro (includes an optional search box) Take me back to Confluence Documentation Home

Document generated by Confluence on Nov 05, 2009 23:36