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.

Comments

mkalkbrenner’s picture

Status: Active » Needs review
StatusFileSize
new1.23 KB
mkalkbrenner’s picture

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
StatusFileSize
new11.96 KB
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

+++ 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

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
StatusFileSize
new12.65 KB

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.