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

Esta obra está autorizada con arreglo a la licencia de Reconocimiento-NoComercial-CompartirIgual 3.0 Unported de Creative Commons.  Los términos de Creative Commons no cubren las publicaciones en Twitter™ y Facebook.

Avisos legales   |   Política de privacidad en línea