Documentation

Boosting search results

Boosting search results

Go to:

The search index in ThoughtFarmer is made up of a series of documents. Each document represents a page, user, attachment or comment. Each document is made up of a number of fields which can be searched eg. title, body, tags.

When searching on a term in ThoughtFarmer, the search engine goes through all documents in the index and calculates a score based on how relevant that term is to each document.

These scores can be modified by giving the documents in your search index different boosts, which will adjust the final score, changing the rankings of the returned results.

By default, every document starts with the same boost factor of one. If you change the boost of a particular document to less than one, it will end up with a lower score and show up lower in the list of search results. If you change the boost to greater than one, it will end up with a higher score and show up higher in the search results.

Important: Changes in boost factors will not apply until a site wide re-index is complete in the administration panel.

Changing boost factors

Boost factors can be changed by going to the Administration panelAdvanced options section > Configuration settings screen.

  1. Go the Administration panelAdvanced options section > Configuration settings screen.
  2. Type boost in the Search config settings screen to narrow the list of config settings.

    5.5Admin6077ChangeBoostFactor2.png

  3. Find the config setting you want to change.
  4. Click in the Value column beside the config setting and enter the new value.
  5. Click Save.

Field level boost factors

These are boost factors that belong to specific fields within a document in the search index.

Factor Definition Suggested Value
boost.title The amount of boost given when a search term is found in the title. For example, if I searched on "Test", the search result "Test Papers" would be boosted by the value of this factor.

Setting the value to 50 will make sure that results with the search term in the title will always appear at or near the top of the search results.
20
boost.body The amount of boost given when a search term is found in the body. For example, if I searched on "Test", the search result with the body "These are the test papers for..." would be boosted by the value of this factor

Setting the value to 0.5 will lower the importance of items with search terms in the documents body.
1.0
boost.summary The amount of boost given when a search term is found in the summary

Setting the value to 0.5 will lower the importance of items with search terms in the documents summary.
1.0
boost.breadcrumbs The amount of boost given when a search term is found in the breadcrumb trail 1.5
boost.name The amount of boost given to a name of user match 1.5
boost.tags The amount of boost given when a search term is found as a tag 1.5

Document level boost factors

These are boost factors that apply to an entire document in the search index.

Factor Definition Suggested Value
boost.user This boost applies when a result is for a user. For example, if I searched on "Doe", the search result for John Doe's Place would be boosted by the value of this factor.

Setting the value to 10 will make sure that a search result for a user shows up higher in the search results.
10
boost.document This boost applies when a result is for an attachment. For example, if I searched on "budget", the search result for the attachment "2008-budget.xls" would be boosted by the value of this factor.

Setting the value to 1 will have no positive or negative boost effect on a search result for an attachment.
1
boost.comments This boost applies when a result is for a comment. For example, if I searched on "budget", the search result for the comment "Please review these budget numbers" would be boosted by the value of this factor.

Setting the value of this to 0.01 will push comments to the end or near the end of the search results.
0.01
boost.discussionCapture The amount of boost for Discussion Capture pages

Setting the value of this to 0.01 will push Discussion Capture conversations to the end or near the end of the search results.
0.01
 

Special boost factors

These boost factors apply to calculating how favorites and ratings affect the ranking of a document.

Factor Definition Suggested Value
boost.favorites The number of times a page has been favorited multiplied by a number between 0 and 1. For example, a page with 5 votes and a boost of 0.5 will have a boost value of 2.5 added to the pages score 0.5
boost.likes The number of likes for a page multiplied by a number between 0 and 1. For example, a page with 5 likes and a boost of 0.5 will have a boost value of 2.5 added to the pages score 0.5