WIP: Make mail server logs searchable - #9415
Draft
laurentS wants to merge 2 commits into
Draft
Conversation
Collaborator
Author
|
We might need to get rid of the overridden |
Member
Not sure if this is necessarily the best place for this comment, but just at a quick glance I wonder if we could have a setup where we have the generic class SomeRecord
include Searchable
# Uses the default reindex_all method
end
class AnotherRecord
include Searchable
def self.reindex_all
# custom implementation
end |
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.
Relevant issue(s)
#8814
What does this do?
This makes
MailServerLogs searchable via the new postgres based search system.Why was this needed?
Implementation notes
See #9334 (comment) about speeding up this specific model's indexing, for the reasoning behind overriding the base
reindex_allmethod.Trimming log lines before indexing them will probably help with index size. The email log lines contain a lot of "trivial" text that is very unlikely to be searched (timestamps, server name which appears on every line, "postfix", etc...).
This would probably require a separate SQL function for each MTA.
Screenshots
Notes to reviewer
Have you updated the changelog? If this is not necessary, put square brackets around this: skip changelog