Caution: This documentation is for eZ Publish legacy, from version 3.x to 5.x.
For 5.x documentation covering Platform see eZ Documentation Center, for difference between legacy and Platform see 5.x Architecture overview.

Boosting Dedicated Functions

Fetch Function Parameter: boost_functions

Boosts can be passed as function boosts which should be done according to the Solr function query syntax.

The fetch parameter should be specified as:

{set $search=fetch( ezfind,search,
        hash( 'query', $search_text,
        ... ,
        'boost_functions', hash('functions',
array('<boostfunction n>', ...)),
        ...

where 'boost function n' should adhere to technical syntax of Solr functions.

Note: The Solr query syntax is quite elaborate but powerful, and documented on the Solr wiki pages: http://wiki.apache.org/solr/FunctionQuery

For example, the following boost function will favor more recent pages over older ones:

{set $search=fetch( ezfind,
       hash( 'query', $search_text,
            'offset', $view_parameters.offset,
            'limit', $page_limit,
            'sort_by', hash( 'score', 'desc' ),
            'boost_functions', hash('functions',
array('recip(ms(NOW/HOUR,meta_published_dt),4e-12,1000,2)')) )}

Paul Borgermans (23/05/2012 3:04 pm)

Andrea Melo (05/06/2012 9:47 am)

Paul Borgermans, Andrea Melo


Comments

There are no comments.