The code and UI of apachesolr are prepared for different environments (indexes).
But currently most of the setting forms in the UI for the non-default environments are blocked.
I created a patch to unblock these forms and fixed some remaining issues in the code for that functionality in the UI. I guess, these issues might have been the reason for blocking the features.
Having these issues fixed additionally allows to run the cron indexer for all writable environments.

Files: 
CommentFileSizeAuthor
#11 1915614_config_actions_indexing_all_writable_envs_11.patch12.65 KBkevin.dutra
FAILED: [[SimpleTest]]: [MySQL] Repository checkout: failed to checkout from [git://git.drupal.org/project/cck.git]. View
#9 1915614_config_actions_indexing_all_writable_envs_9.patch12.12 KBNick_vh
PASSED: [[SimpleTest]]: [MySQL] 513 pass(es). View
#8 1915614_config_actions_indexing_all_writable_envs.patch11.9 KBmkalkbrenner
PASSED: [[SimpleTest]]: [MySQL] 513 pass(es). View
#6 1915614_config_actions_indexing_all_writable_envs.patch11.96 KBmkalkbrenner
PASSED: [[SimpleTest]]: [MySQL] 513 pass(es). View
#2 1915614_config_actions_indexing_all_writable_envs.patch11.93 KBmkalkbrenner
FAILED: [[SimpleTest]]: [MySQL] 110 pass(es), 5 fail(s), and 0 exception(s). View
#1 1915418_index_bundle_in_dedicated_env.patch1.23 KBmkalkbrenner
PASSED: [[SimpleTest]]: [MySQL] 513 pass(es). View

Comments

mkalkbrenner’s picture

Status: Active » Needs review
FileSize
1.23 KB
PASSED: [[SimpleTest]]: [MySQL] 513 pass(es). View
mkalkbrenner’s picture

FileSize
11.93 KB
FAILED: [[SimpleTest]]: [MySQL] 110 pass(es), 5 fail(s), and 0 exception(s). View

Status: Needs review » Needs work

The last submitted patch, 1915614_config_actions_indexing_all_writable_envs.patch, failed testing.

mkalkbrenner’s picture

Status: Needs work » Needs review

Status: Needs review » Needs work

The last submitted patch, 1915614_config_actions_indexing_all_writable_envs.patch, failed testing.

mkalkbrenner’s picture

Status: Needs work » Needs review
FileSize
11.96 KB
PASSED: [[SimpleTest]]: [MySQL] 513 pass(es). View
Nick_vh’s picture

+++ b/apachesolr.admin.incundefined
@@ -367,8 +367,7 @@ function apachesolr_settings(array $form, array &$form_state) {
-         array('query' => array('destination' => current_path()))

Removed?

+++ b/apachesolr.index.incundefined
@@ -157,6 +157,8 @@ function apachesolr_index_status($env_id) {
+      ->orderBy('aie.changed', 'ASC')
+      ->orderBy('aie.entity_id', 'ASC')

is this necessary?

+++ b/apachesolr.moduleundefined
@@ -898,67 +898,75 @@ function apachesolr_get_last_index_updated($env_id) {
+    module_load_include('inc', 'apachesolr', 'apachesolr.index');

module_load in a foreach? Why not leave it at the top?

mkalkbrenner’s picture

FileSize
11.9 KB
PASSED: [[SimpleTest]]: [MySQL] 513 pass(es). View
+++ b/apachesolr.admin.incundefined
@@ -367,8 +367,7 @@ function apachesolr_settings(array $form, array &$form_state) {
-         array('query' => array('destination' => current_path()))
Removed?

Yes, it conflicted with with the new per env redirects in apachesolr_index_action_form_cron_submit,
apachesolr_index_action_form_remaining_confirm_submit, apachesolr_index_action_form_reset_confirm_submit,
apachesolr_index_action_form_delete_confirm_submit

+++ b/apachesolr.index.incundefined
@@ -157,6 +157,8 @@ function apachesolr_index_status($env_id) {
+      ->orderBy('aie.changed', 'ASC')
+      ->orderBy('aie.entity_id', 'ASC')
is this necessary?

It's already documented some lines above but was missing in the statement:

    // Find the next batch of entities to index for this entity type.  Note that
    // for ordering we're grabbing the oldest first and then ordering by ID so
    // that we get a definitive order.
    $query = db_select($table, 'aie')
      ->condition('aie.bundle', $bundles)
      ->condition('aie.status', 1)
      ->condition(db_or()
        ->condition('aie.changed', $last_changed, '>')
        ->condition(db_and()
          ->condition('aie.changed', $last_changed, '<=')
          ->condition('aie.entity_id', $last_entity_id, '>')))
      ->orderBy('aie.changed', 'ASC')
      ->orderBy('aie.entity_id', 'ASC')
      ->addTag('apachesolr_index_' . $entity_type);

see #1828014: Mass re-indexation can miss (a lot of) content

+++ b/apachesolr.moduleundefined
@@ -898,67 +898,75 @@ function apachesolr_get_last_index_updated($env_id) {
+    module_load_include('inc', 'apachesolr', 'apachesolr.index');
module_load in a foreach? Why not leave it at the top?

You're right. New patch attached.

Nick_vh’s picture

FileSize
12.12 KB
PASSED: [[SimpleTest]]: [MySQL] 513 pass(es). View

the ordering is not necessary

Nick_vh’s picture

Version: 7.x-1.x-dev » 6.x-3.x-dev
Status: Needs review » Patch (to be ported)

Committed, thanks!

kevin.dutra’s picture

Status: Patch (to be ported) » Needs review
FileSize
12.65 KB
FAILED: [[SimpleTest]]: [MySQL] Repository checkout: failed to checkout from [git://git.drupal.org/project/cck.git]. View

Status: Needs review » Needs work

The last submitted patch, 1915614_config_actions_indexing_all_writable_envs_11.patch, failed testing.

milovan’s picture

Patch from post #11 doesn't work.
Even though that two cores have two separate links, if I go to the non-default core and click Delete Index, it will wipe index in default core and redirect me to default page. If I return to non default page, I still see that its index remained as before (not wiped).

mkalkbrenner’s picture

Assigned: Unassigned » mkalkbrenner
Issue summary: View changes
Status: Needs work » Fixed

  • mkalkbrenner committed 8d6c0c4 on 6.x-3.x
    Issue #1915614 by mkalkbrenner, Nick_vh: Added Complete admin settings...
  • mkalkbrenner committed ea7713e on 6.x-3.x
    Issue #1915614 by mkalkbrenner, Nick_vh: Added Complete admin settings...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.