Index: apachesolr_search.admin.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/apachesolr/apachesolr_search.admin.inc,v
retrieving revision 1.1.2.12
diff -u -p -r1.1.2.12 apachesolr_search.admin.inc
--- apachesolr_search.admin.inc	20 Feb 2009 02:03:38 -0000	1.1.2.12
+++ apachesolr_search.admin.inc	20 Feb 2009 15:18:27 -0000
@@ -33,6 +33,7 @@ function apachesolr_search_bias_form($fo
   $date_settings = variable_get('apachesolr_search_date_boost', '4:200.0');
   $comment_settings = variable_get('apachesolr_search_comment_boost', '0:0');
   $changed_settings = variable_get('apachesolr_search_changed_boost', '0:0');
+  $sticky_settings = variable_get('apachesolr_search_sticky_boost', '21.0');
   
   $options = array(
     '10:2000.0' => '10',
@@ -47,7 +48,9 @@ function apachesolr_search_bias_form($fo
     '1:100.0' => '1',
     '0:0' => t('Omit'),
   );
-
+  $weights_sticky = drupal_map_assoc(array('21.0', '13.0', '8.0', '5.0', '3.0', '2.0', '1.0', '0.8', '0.5', '0.3', '0.2', '0.1'));
+  $weights_sticky['0'] = t('Normal');
+  
   $form['biasing'] = array(
     '#type' => 'fieldset',
     '#title' => t('Result biasing'),
@@ -55,6 +58,13 @@ function apachesolr_search_bias_form($fo
     '#collapsed' => FALSE,
     '#description' => t('Give bias to certain properties when ordering the search results. Choose <em>Omit</em> to ignore this for any given property.'),
   );
+  $form['biasing']['apachesolr_search_sticky_boost'] = array(
+    '#type' => 'select',
+    '#options' => $weights_sticky,
+    '#title' => t("'Sticky at top of lists' bias"),
+    '#default_value' => $sticky_settings,
+    '#description' => t('This setting will change the result scoring so that nodes with the "Sticky at top of lists" option set in their publishing options may appear before those with higher keyword matching.'),
+  );
   $form['biasing']['apachesolr_search_date_boost'] = array(
     '#type' => 'select',
     '#options' => $options,
Index: apachesolr_search.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/apachesolr/apachesolr_search.module,v
retrieving revision 1.1.2.6.2.74
diff -u -p -r1.1.2.6.2.74 apachesolr_search.module
--- apachesolr_search.module	20 Feb 2009 02:03:38 -0000	1.1.2.6.2.74
+++ apachesolr_search.module	20 Feb 2009 15:18:28 -0000
@@ -203,6 +203,11 @@ function apachesolr_search_search($op = 
         if ($changed_boost) {
           $params['bf'][] = "recip(rord(last_comment_or_change),$changed_steepness,$total,$total)^$changed_boost";
         }
+        // Boost for nodes with sticky bit set.
+        $sticky_boost = variable_get('apachesolr_search_sticky_boost', '21.0');
+        if (intval($sticky_boost)>0) {
+          $params['bq'][] = "sticky:true^$sticky_boost";
+        }
         // Modify the weight of results according to the node types.
         $type_boosts = variable_get('apachesolr_search_type_boosts', array());
         if (!empty($type_boosts)) {
