Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2994689 Allow disabling indexes #83

Open
wants to merge 6 commits into
base: 8.x-7.x
Choose a base branch
from

Conversation

eelkeblok
Copy link

@eelkeblok eelkeblok commented Apr 4, 2022

This is a PR originally opened at https://www.drupal.org/project/elasticsearch_helper/issues/2994689, updated to work with version 7. Squashing is probably a good idea, the Git history is a bit of a mess due to first applying the 5.x verison of the patch.

Problem/Motivation

In some cases it may be beneficial to be able to disable search indexes. For example, we have a use case where our elastic search provider is requesting us to do a nightly re-index on a separate index, that will be swapped for the active index when reindexing is complete. In order to keep the index defined, but not have it updated during the day, we wish to disable it except when the time comes to do the nightly rebuild.

Proposed resolution

Introduce a configuration key that keeps a status per index.

Remaining tasks

  • Provide patch
  • Re-integrate UI (got lost in allowing multiple servers)
  • Review
  • Merge

User interface changes

A series of checkboxes will be introduced in the settings form.

API changes

A method will be made available on the plugin manager to check the status of an index.

Data model changes

No backwards incompatible changes. The proposed patch treats indexes that were not explicitly enabled or disabled in settings as enabled by default.

eiriksm and others added 6 commits September 17, 2018 10:53
Conflicts:
config/install/elasticsearch_helper.settings.yml
config/schema/elasticsearch_helper.schema.yml
elasticsearch_helper.module
src/Form/ElasticsearchHelperSettingsForm.php
tests/src/FunctionalJavascript/EntityOpsTest.php

All resolved by picking 7 version.
Conflicts:
elasticsearch_helper.services.yml
src/Plugin/ElasticsearchIndexManager.php
@eelkeblok
Copy link
Author

I just found that the UI for enabling and disabling indexes got lost when merging in the changes for multiple servers in the settings form, so this has some work left.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant