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

fix #2275 #2284

Merged
merged 3 commits into from
Aug 10, 2021
Merged

fix #2275 #2284

merged 3 commits into from
Aug 10, 2021

Conversation

dustinrue
Copy link
Contributor

Description of the Change

Refactors the multi site handling so that when blogs are updated (marked as spam, archived or deleted), their indexes are also removed from the ES server. Also protects global indexes, like User, from being deleted.

Alternate Designs

Benefits

Keeps backend servers clean of unwanted data

Possible Drawbacks

It's possible for data meant to be kept to remove. Users should use ep_keep_index to keep the data.

Verification Process

Refactored the code then tested to ensure updated sites had their data removed. One think I'm seeing is that activating a site again does not cause it to be reindexed again.

Checklist:

  • I have read the CONTRIBUTING document.
  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my change.
  • All new and existing tests passed.

Applicable Issues

Resolved #2275

Changelog Entry

Fixed #2275 - ElasticPress will now remove data from Elasticsearch on a multisite network when a site is archived, deleted or marked as spam

Copy link
Contributor

@oscarssanchez oscarssanchez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The code looks good to me, the only thing I noticed when testing is if the site status changes to publish it won't attempt a reindex. Should we trigger this or add a notice for the specific site?

@oscarssanchez oscarssanchez merged commit da4ca4d into 10up:develop Aug 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

BUG: only the "post" indexable is acted upon when a site's status changes
4 participants