Use boosts at indexing time, and at query runtime.

You can configure boosts at indexing time, for example, to boost specific properties, and at query execution to boost a specific word in the query. For more information, see

Boosts at query runtime

Set the boosts at query execution in the query itself, using the ^ operator.


jcr:contains(., 'jelly sandwich^4')

In this example, the word "sandwich" has weight four times more than the word "jelly."

Boosts at indexing time

Configure boosts at indexing time in the search indexing configuration file (see IndexingConfig).


Bsp indexing_config.xml:
 <?xml version="1.0"?>
 <!DOCTYPE configuration SYSTEM

   <index-rule nodeType="cq:PageContent">
       <property boost="4.0">jcr:title</property>


In this example, the property jcr:title has weight four times more than normal properties.

Note: The boost in this case is respected only if a jcr:contains() is done on the corresponding property, for example jcr:contains(@jcr:title, 'find this'). If there is only a jcr:contains(., 'find this'),  the boosts at indexing time have no effect.

Find more information about possible configurations in the search indexing configuration file on the jackrabbit wiki, see (Note: It is jackrabbit-specific and must not be absolutely equivalent in CRX!)

Note: For information on how to modify the indexing_config.xml mentioned in this article, see

This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License  Twitter™ and Facebook posts are not covered under the terms of Creative Commons.

Legal Notices   |   Online Privacy Policy