Created
November 15, 2013 15:46
-
-
Save mrded/7486450 to your computer and use it in GitHub Desktop.
Drupal: boost relevance for solr search. #1926090
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Implements hook_search_api_solr_query_alter(). | |
*/ | |
function custom_api_search_api_solr_query_alter(array &$call_args, SearchApiQueryInterface &$query) { | |
$call_args['params']['fl'] = 'is_votes-sightsrank,' . $call_args['params']['fl'] ; | |
$call_args['params']['bf'] = "recip(rord(is_votes-sightsrank),1, 1000, 1000)"; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment