Make info request events searchable - #9414
Open
laurentS wants to merge 4 commits into
Open
Conversation
laurentS
force-pushed
the
admin-search-info-request-events
branch
from
August 12, 2026 08:28
5759038 to
c2d085b
Compare
This only allows modifying the params attribute, as the anticipated use case is removal of personal data, which can only happen in this particular attribute. This limits the risk of causing data inconsistency.
laurentS
force-pushed
the
admin-search-info-request-events
branch
from
August 14, 2026 15:26
c2d085b to
e45213f
Compare
laurentS
force-pushed
the
admin-search-info-request-events
branch
from
August 14, 2026 15:30
e45213f to
f07ff81
Compare
laurentS
marked this pull request as ready for review
August 14, 2026 15:55
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
#8816
What does this do?
This makes
InfoRequestEvents searchable via the new postgres based search system.It also adds a search page for events, along with a simple edit form to remove PII.
Why was this needed?
Implementation notes
The JSON blobs can contain a lot of information that isn't useful to keep in the search index (eg. refs to user IDs, timestamps...). This uses a SQL stored function to preprocess the data inside postgres. The benefit compared to doing this in ruby-land is that the
SearchDocumentcan be upserted in a single SQL query, instead of at least 2 if doing it in ruby. When batching updates, it's even possible to do the entire batch in a single SQL query (see #9334 (comment) about DB roundtrip overhead).Given the number of events in the db, the time saving should be very substantial (see below).
Screenshots
The search page:

The edit page:

which is limited to the JSON params attribute, to limit risk of breaking data consistency. I didn't see an obvious existing way to validate the json content. I believe maybe
def params=should do that?Notes to reviewer
Ideally merge this after #9439 to benefit from the fasterreindex_allimplementation in that PR, which is likely to reduce the initial indexing time by a lot.Edit: on 328k events, the faster
reindex_allran in 10s on my laptop, vs several minutes with the default version.Have you updated the changelog? If this is not necessary, put square brackets around this: [skip changelog]