-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Stop using http request to index forum posts as We use lila-search's ingestor for indexing #15517
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -223,14 +223,11 @@ final class ForumPostApi( | |
| postRepo.coll.update | ||
| .one($id(post.id), post.erase) | ||
| .void | ||
| .andDo: | ||
| Bus.pub(BusForum.ErasePost(post.id)) | ||
|
|
||
| def eraseFromSearchIndex(user: User): Funit = | ||
| postRepo.coll | ||
| .distinctEasy[ForumPostId, List]("_id", $doc("userId" -> user.id), _.sec) | ||
| .map: ids => | ||
| Bus.pub(BusForum.ErasePosts(ids)) | ||
| .map(ids => Bus.pub(BusForum.ErasePosts(ids))) | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. the entire function should be gone There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think We don't delete user's forum posts in db. Only remove forum post's indexes in elastic search. That's why I keep this. |
||
|
|
||
| def teamIdOfPostId(postId: ForumPostId): Fu[Option[TeamId]] = | ||
| postRepo.coll.byId[ForumPost](postId).flatMapz { post => | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I removed it because We didn't use
postIdsbut this probably caused by an oversight: 5c94dc2#diff-27d0d9308aaabb53c6b0b2d6f43db2c751e7a7577ec4041e031d8d6f3338469e