Fix stale Spotlight results for posts and sites - #25990
Open
crazytonyli wants to merge 3 commits into
Open
Conversation
Spotlight indexing ran only when a post moved to scheduled or published, so title and content edits to an existing post left a stale entry until the Posts list reloaded. Index the post after every successful save.
Trashing a post removed its Spotlight item, but permanently deleting one did not, so the stale result kept opening the app to nothing. Remove the item by identifier after the deletion succeeds.
Removing a site cleared Spotlight only when no account remained, so on a multi-site account the removed site's posts stayed searchable and opened the app to nothing. Delete the site's Spotlight domain when the user removes it and when account sync prunes it. The domain rule moves to Blog so posts and this cleanup share it.
Collaborator
Generated by 🚫 Danger |
Contributor
|
| App Name | WordPress | |
| Configuration | Release-Alpha | |
| Build Number | 34371 | |
| Version | PR #25990 | |
| Bundle ID | org.wordpress.alpha | |
| Commit | 439a684 | |
| Installation URL | 1esp947asv7o8 |
Contributor
|
| App Name | Jetpack | |
| Configuration | Release-Alpha | |
| Build Number | 34371 | |
| Version | PR #25990 | |
| Bundle ID | com.jetpack.alpha | |
| Commit | 439a684 | |
| Installation URL | 592st7effv8f0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Description
To reproduce the issues, index a post and then edit it, permanently delete it, or remove its site. Spotlight can retain the old result.
This PR:
Blog.searchDomainprovides the shared domain identifier.Testing instructions