Drupal + Solr, how to boost search results with updated date? I'm trying to boost search results to give more relevancy to newly updated / created content. What I have tried is to use the following:

/**
 * Implementation of hook search_api_solr_query_alter
 */
function mml_search_search_api_solr_query_alter(array &amp;$call_args, SearchApiQueryInterface $query) {
  // Boost by changed date. Fresher to top.
  $call_args['params']['freshness'] = 'recip(abs(ms(NOW/HOUR,ds_changed)),3.16e-11,10,1)';
}


But it doesn't seem to have any effect.

Any help would be appreciated.

Here is screenshot of solr admin side of the "field" Im trying to boost http://monosnap.com/image/A3c6WOGi71z0Smeke8tYgBbnoeNkyK
This module may be a solution https://www.drupal.org/project/search_api_sorts

Otherwise using you method above - According to this post http://www.metaltoad.com/blog/date-boosting-solr-drupal-search-results

then you need to add an extra []

$call_args['params']['freshness'][] = 'recip(abs(ms(NOW/HOUR,ds_changed)),3.16e-11,10,1)';


However after testing I still can get the result I want.  

For example the value 3.16e-11,10 ; as far as I understand it means a year of milliseconds that gives a score of 10 inside that time span. and then decrease after.  

For testing I used 

call_args['params']['qf'][] = 'recip(abs(ms(NOW/HOUR,ds_changed)),86400000,21,1)';


which should give Posts added/changed on the day a score of 21 and then decreases daily. 

Testing with 3 identical listings.  And only title set at a boost rate over 1.  I cannot get the articles to listing in date. order. Have i missed something obvious.