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: Reverted descendant pages do not appear in search results #7587

Conversation

miya
Copy link
Member

@miya miya commented Apr 20, 2023

Task

#120476 ゴミ箱に出し入れした際の全文検索のバグを修正する
#120723 修正 (問題2)

@miya miya requested a review from yuki-takei April 20, 2023 08:47
@miya miya self-assigned this Apr 20, 2023
@miya miya temporarily deployed to VRT April 20, 2023 09:12 — with GitHub Actions Inactive
@@ -2064,6 +2064,7 @@ class PageService {
await PageTagRelation.updateMany({ relatedPage: page._id }, { $set: { isPageTrashed: false } });

this.pageEvent.emit('revert', page, user);
this.pageEvent.emit('create', updatedPage, user);
Copy link
Member

Choose a reason for hiding this comment

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

これはおかしい

revert event 発火時の処理を見直すべきなのでは?

Copy link
Member Author

Choose a reason for hiding this comment

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

revert event の中で es に対して必要な処理を行うように修正しました

@@ -2101,6 +2102,9 @@ class PageService {

throw err;
}
finally {
this.pageEvent.emit('syncDescendantsUpdate', updatedPage, user);
Copy link
Member

Choose a reason for hiding this comment

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

try の中に入れたいな

Copy link
Member Author

Choose a reason for hiding this comment

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

修正済み

@miya miya requested a review from yuki-takei April 21, 2023 01:41
@miya miya temporarily deployed to VRT April 21, 2023 01:59 — with GitHub Actions Inactive
@miya miya temporarily deployed to VRT April 21, 2023 02:45 — with GitHub Actions Inactive
@reg-suit
Copy link

reg-suit bot commented Apr 21, 2023

reg-suit detected visual differences.

Check this report, and review them.

🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴🔴
⚪⚪⚪⚪⚪⚪⚪⚪⚪⚪⚪
⚫⚫
🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵🔵

What do the circles mean? The number of circles represent the number of changed images.
🔴 : Changed items, ⚪ : New items, ⚫ : Deleted items, and 🔵 Passed items

How can I change the check status? If reviewers approve this PR, the reg context status will be green automatically.

pageEvent.on('revert', (targetPage, revertedPage, user) => {
this.fullTextSearchDelegator.syncPageDeleted.bind(this.fullTextSearchDelegator)(targetPage, user);
this.fullTextSearchDelegator.syncPageUpdated.bind(this.fullTextSearchDelegator)(revertedPage, user);
});
Copy link
Member Author

Choose a reason for hiding this comment

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

page に対す処理と pageEvent 内の es に対する処理が同じになるようにしました

@yuki-takei yuki-takei merged commit a1b6f03 into master Apr 21, 2023
@yuki-takei yuki-takei deleted the fix/120723-reverted-descendant-pages-do-not-appear-in-search-results branch April 21, 2023 11:29
@github-actions github-actions bot mentioned this pull request Apr 21, 2023
@yuki-takei yuki-takei mentioned this pull request May 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging this pull request may close these issues.

2 participants