Index: apachesolr_search.module
===================================================================
--- apachesolr_search.module	(revision 1175)
+++ apachesolr_search.module	(working copy)
@@ -862,6 +862,15 @@
 function apachesolr_search_form_search_admin_settings_alter(&$form, $form_state) {
   $form['indexing_throttle']['search_cron_limit']['#options']['0'] = '0';
   ksort($form['indexing_throttle']['search_cron_limit']['#options']);
+
+  if (variable_get('apachesolr_search_make_default', 0) && variable_get('apachesolr_failure', 'show_error') != 'show_drupal_results') {
+    $form['indexing_throttle']['search_cron_limit']['#disabled'] = TRUE;
+    $form['indexing_throttle']['search_cron_limit']['#description'] .= ' ' . t('Disabled, because Apache Solr Search is configured as default without fallback to core search.');
+    if (empty($form_state['post'])) {
+      drupal_set_message(t('Apache Solr Search is configured as default without fallback to core search.'), 'warning');
+    }
+  }
+
 }
 
 /**
@@ -996,6 +1005,11 @@
  * This adds options to the apachesolr admin form.
  */
 function apachesolr_search_form_apachesolr_settings_alter(&$form, $form_state) {
+  $form['apachesolr_failure_previous'] = array(
+    '#type' => 'value',
+    '#value' => variable_get('apachesolr_failure', 'show_error'),
+  );
+
   $form['advanced']['apachesolr_search_make_default'] = array(
     '#type' => 'radios',
     '#title' => t('Make Apache Solr Search the default'),
@@ -1046,6 +1060,20 @@
     // Take account of path changes
     menu_rebuild();
   }
+
+  if ($form_state['values']['apachesolr_search_default_previous'] != variable_get('apachesolr_search_make_default', 0)
+    || $form_state['values']['apachesolr_failure_previous'] != variable_get('apachesolr_failure', 'show_error')) {
+
+    if (variable_get('apachesolr_search_make_default', 0) && variable_get('apachesolr_failure', 'show_error') != 'show_drupal_results') {
+      variable_set('apachesolr_search_core_search_cron_limit', variable_get('search_cron_limit', 100));
+      variable_set('search_cron_limit', 0);
+      drupal_set_message(t('You made Apache Solr Search the default and disabled the core search fallback. In order to increase cron performance the core search indexer has been turned off.'), 'notice');
+    }
+    elseif (!variable_get('search_cron_limit', 100)) {
+      variable_set('search_cron_limit', variable_get('apachesolr_search_core_search_cron_limit', 100));
+      drupal_set_message(t('The core search indexer has been turned on.'), 'notice');
+    }
+  }
 }
 
 /**
