Become Zend Certified

Prepare for the ZCE exam using our quizzes (web or iPad/iPhone). More info...

When you're ready get 7.5% off your exam voucher using voucher CJQNOV23 at the Zend Store

Boosting a Term

Java Lucene and Zend_Search_Lucene provide the relevance level of matching documents based on the terms found. To boost the relevance of a term use the caret, "^", symbol with a boost factor (a number) at the end of the term you are searching. The higher the boost factor, the more relevant the term will be.

Boosting allows you to control the relevance of a document by boosting individual terms. For example, if you are searching for

PHP framework

and you want the term "PHP" to be more relevant boost it using the ^ symbol along with the boost factor next to the term. You would type:

PHP^4 framework

This will make documents with the term PHP appear more relevant. You can also boost phrase terms and subqueries as in the example:

"PHP framework"^4 "Zend Framework"

By default, the boost factor is 1. Although the boost factor must be positive, it may be less than 1 (e.g. 0.2).

Zend Framework