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)')) )} Contributors
- Paul Borgermans Maintainer
- Andrea Melo Updated Maintainer
Comments
Add a comment